Switch to last workspace after persp-load
A little more intuitive than just switching to main workspace.
This commit is contained in:
parent
5f04be599f
commit
8cb36afa21
1 changed files with 4 additions and 1 deletions
|
@ -111,7 +111,10 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
|||
|
||||
(defun +workspaces|leave-nil-perspective (&rest _)
|
||||
(when (string= (+workspace-current-name) persp-nil-name)
|
||||
(persp-frame-switch +workspaces-main)))
|
||||
(+workspace-switch (or (if (+workspace-p +workspace--last) +workspace--last)
|
||||
(car (+workspace-list-names))
|
||||
+workspaces-main)
|
||||
'auto-create)))
|
||||
(add-hook 'persp-after-load-state-functions #'+workspaces|leave-nil-perspective)
|
||||
|
||||
;; Modify `delete-window' to close the workspace if used on the last window
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue