Optimize: update persp name.

This commit is contained in:
Vincent Zhang 2018-12-10 02:25:37 +08:00
parent 900c501e1f
commit eabb8fb56c

View file

@ -1333,12 +1333,13 @@ Requires `eyebrowse-mode' to be enabled."
(add-hook 'find-file-hook #'doom-modeline-update-persp-name) (add-hook 'find-file-hook #'doom-modeline-update-persp-name)
(add-hook 'after-revert-hook #'doom-modeline-update-persp-name) (add-hook 'after-revert-hook #'doom-modeline-update-persp-name)
(add-hook 'persp-after-load-state-functions #'doom-modeline-update-persp-name) (add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
(add-hook 'persp-created-functions #'doom-modeline-update-persp-name)
(add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name) (add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name)
(advice-add #'select-window :after #'doom-modeline-update-persp-name) (advice-add #'select-window :after #'doom-modeline-update-persp-name)
(advice-add #'persp-add-buffer :after #'doom-modeline-update-persp-name) ;; (advice-add #'persp-window-switch :after #'doom-modeline-update-persp-name)
(advice-add #'persp-remove-buffer :after #'doom-modeline-update-persp-name) ;; (advice-add #'persp-frame-switch :after #'doom-modeline-update-persp-name)
;; (advice-add #'persp-add-buffer :after #'doom-modeline-update-persp-name)
;; (advice-add #'persp-remove-buffer :after #'doom-modeline-update-persp-name)
(doom-modeline-def-segment persp-name (doom-modeline-def-segment persp-name
"The current perspective name." "The current perspective name."