(require 'sawfish.wm.workspace)

(defcustom num-workspaces-in-row 3
  "Number of rows in the pager"
  :group workspace
  :type number
  :range (1 . nil))

(defun workspace-down
  "Change workspace to the one below"
  (interactive)
  (setq index current-workspace)
  (setq limits (workspace-limits))
  (if ( <= (+ index num-workspaces-in-row) (cdr limits))
      (select-workspace-from-first (+ index num-workspaces-in-row)))
)
(defun workspace-up
  "Change workspace to the one above"
  (interactive)
  (setq index current-workspace)
  (if ( >= (- index num-workspaces-in-row) 0)
       (select-workspace-from-first (- index num-workspaces-in-row)))
)
(defun workspace-left
  "Change workspace to the one on the left"
  (interactive)
  (previous-workspace 1)
)
(defun workspace-right
  "Change workspace to the one on the right"
   (interactive)
   (next-workspace 1)
)
