mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Update env only while focusing in. For Emacs27+.
This commit is contained in:
parent
c7d54f24d0
commit
aad3026ce8
1 changed files with 4 additions and 1 deletions
|
@ -544,7 +544,10 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
|
|||
(add-hook 'find-file-hook #'doom-modeline-update-env)
|
||||
(with-no-warnings
|
||||
(if (boundp 'after-focus-change-function)
|
||||
(add-function :after after-focus-change-function #'doom-modeline-update-env)
|
||||
(add-function :after after-focus-change-function
|
||||
(lambda ()
|
||||
(if (frame-focus-state)
|
||||
(doom-modeline-update-env))))
|
||||
(add-hook 'focus-in-hook #'doom-modeline-update-env)))
|
||||
(defun doom-modeline-update-env ()
|
||||
"Update environment info on mode-line."
|
||||
|
|
Loading…
Reference in a new issue