mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 19:19:53 +00:00
Remove mu4e-alert's string from global modeline string.
This commit is contained in:
parent
9f2a0183fc
commit
cd92bf0ffd
1 changed files with 23 additions and 22 deletions
|
@ -1580,11 +1580,12 @@ mouse-1: Toggle Debug on Quit"
|
||||||
(doom-modeline-def-segment mu4e
|
(doom-modeline-def-segment mu4e
|
||||||
(when (and doom-modeline-mu4e
|
(when (and doom-modeline-mu4e
|
||||||
(doom-modeline--active)
|
(doom-modeline--active)
|
||||||
(bound-and-true-p mu4e-alert-mode-line)
|
(bound-and-true-p mu4e-alert-mode-line))
|
||||||
;; we'll do our own formatting so just need to test for zero
|
|
||||||
(> mu4e-alert-mode-line 0))
|
|
||||||
;; remove mu4e-alert's global modeline string setting
|
;; remove mu4e-alert's global modeline string setting
|
||||||
(setq global-mode-string (delete '(:eval mu4e-alert-mode-line) global-mode-string))
|
(setq global-mode-string (delete '(:eval mu4e-alert-mode-line) global-mode-string))
|
||||||
|
|
||||||
|
;; don't display if the unread mails count is zero
|
||||||
|
(if (> mu4e-alert-mode-line 0)
|
||||||
(concat
|
(concat
|
||||||
" "
|
" "
|
||||||
(propertize
|
(propertize
|
||||||
|
@ -1603,7 +1604,7 @@ mouse-1: Toggle Debug on Quit"
|
||||||
'help-echo (if (= mu4e-alert-mode-line 1)
|
'help-echo (if (= mu4e-alert-mode-line 1)
|
||||||
"You have an unread email"
|
"You have an unread email"
|
||||||
(format "You have %s unread emails" mu4e-alert-mode-line)))
|
(format "You have %s unread emails" mu4e-alert-mode-line)))
|
||||||
" ")))
|
" "))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue