Mu4e: have =mu4e replace an empty workspace

This commit is contained in:
TEC 2020-10-04 01:01:00 +08:00
parent 82c99b78f2
commit 79f8107e43
No known key found for this signature in database
GPG key ID: 779591AFDB81F06C

View file

@ -55,7 +55,12 @@ default/fallback account."
(interactive)
(require 'mu4e)
(if (featurep! :ui workspaces)
(+workspace-switch +mu4e-workspace-name t)
;; delete current workspace if empty
;; this is useful when mu4e is in the daemon
;; as otherwise you can accumulate empty workspaces
(unless (+workspace-buffer-list)
(+workspace-delete (+workspace-current-name)))
(+workspace-switch +mu4e-workspace-name t)
(setq +mu4e--old-wconf (current-window-configuration))
(delete-other-windows)
(switch-to-buffer (doom-fallback-buffer)))