Add +workspace/other #1480
- Rename +workspace/switch-to-last to +workspace/switch-to-final, to avoid ambiguity. - Add +workspace/switch-to-N commands
This commit is contained in:
parent
6b6ea699f4
commit
bc6c4b3e37
3 changed files with 36 additions and 24 deletions
|
@ -327,11 +327,22 @@ end of the workspace list."
|
|||
('error (+workspace-error (cadr ex) t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/switch-to-last ()
|
||||
"Switch to the last workspace."
|
||||
(dotimes (i 9)
|
||||
(fset (intern (format "+workspace/switch-to-%d" i))
|
||||
(lambda () (interactive) (+workspace/switch-to i))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/switch-to-final ()
|
||||
"Switch to the final workspace in open workspaces."
|
||||
(interactive)
|
||||
(+workspace/switch-to (car (last (+workspace-list-names)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/other ()
|
||||
"Switch to the last activated workspace."
|
||||
(interactive)
|
||||
(+workspace/switch-to +workspace--last))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/cycle (n)
|
||||
"Cycle n workspaces to the right (default) or left."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue