mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feature/workspaces: add switch-or-create functionality to +workspace-switch
This commit is contained in:
@ -121,10 +121,12 @@ perspective or its hash table."
|
|||||||
(persp-kill name inhibit-kill-p))
|
(persp-kill name inhibit-kill-p))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +workspace-switch (name)
|
(defun +workspace-switch (name &optional auto-create-p)
|
||||||
"Switch to another workspace."
|
"Switch to another workspace."
|
||||||
(unless (+workspace-exists-p name)
|
(unless (+workspace-exists-p name)
|
||||||
(error "%s is not an available workspace" name))
|
(if auto-create-p
|
||||||
|
(+workspace-new name)
|
||||||
|
(error "%s is not an available workspace" name)))
|
||||||
(persp-frame-switch name))
|
(persp-frame-switch name))
|
||||||
|
|
||||||
(defun +workspace--generate-id ()
|
(defun +workspace--generate-id ()
|
||||||
|
Reference in New Issue
Block a user