feature/workspaces: unselect side-windows when switching workspaces #499
This commit is contained in:
parent
5762c568f6
commit
484cba1b1b
1 changed files with 9 additions and 0 deletions
|
@ -113,6 +113,15 @@ Uses `+workspaces-main' to determine the name of the main workspace."
|
||||||
;; On `doom/cleanup-session', delete buffers associated with no perspectives
|
;; On `doom/cleanup-session', delete buffers associated with no perspectives
|
||||||
(add-hook 'doom-cleanup-hook #'+workspaces|cleanup-unassociated-buffers)
|
(add-hook 'doom-cleanup-hook #'+workspaces|cleanup-unassociated-buffers)
|
||||||
|
|
||||||
|
(defun +workspaces|select-non-side-window (&rest _)
|
||||||
|
"Ensure a side window isn't current when switching workspaces."
|
||||||
|
(when (window-parameter nil 'window-side)
|
||||||
|
(select-window
|
||||||
|
(cl-loop for win in (window-list)
|
||||||
|
unless (window-parameter win 'window-side)
|
||||||
|
return win))))
|
||||||
|
(add-hook 'persp-before-deactivate-functions #'+workspaces|select-non-side-window)
|
||||||
|
|
||||||
;; per-frame workspaces
|
;; per-frame workspaces
|
||||||
(setq persp-init-frame-behaviour t
|
(setq persp-init-frame-behaviour t
|
||||||
persp-init-new-frame-behaviour-override nil
|
persp-init-new-frame-behaviour-override nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue