mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Switch to last workspace after persp-load
A little more intuitive than just switching to main workspace.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user