mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 19:19:53 +00:00
fix mu4e-alert-mode-line numberp error
This commit is contained in:
parent
d46b5434f2
commit
b29ce18e68
1 changed files with 22 additions and 20 deletions
|
@ -1586,26 +1586,28 @@ mouse-1: Toggle Debug on Quit"
|
||||||
(doom-modeline--active)
|
(doom-modeline--active)
|
||||||
(bound-and-true-p mu4e-alert-mode-line))
|
(bound-and-true-p mu4e-alert-mode-line))
|
||||||
;; don't display if the unread mails count is zero
|
;; don't display if the unread mails count is zero
|
||||||
(if (> mu4e-alert-mode-line 0)
|
(mu4e-alert--get-mu-unread-mails
|
||||||
(concat
|
(lambda (mails)
|
||||||
" "
|
(if (> (length mails) 0)
|
||||||
(propertize
|
(concat
|
||||||
(concat
|
" "
|
||||||
(if doom-modeline-icon
|
(propertize
|
||||||
(doom-modeline-icon-material "mail"
|
(concat
|
||||||
:height 1.1
|
(if doom-modeline-icon
|
||||||
:v-adjust -0.225
|
(doom-modeline-icon-material "mail"
|
||||||
:face 'doom-modeline-warning)
|
:height 1.1
|
||||||
(propertize "#"
|
:v-adjust -0.225
|
||||||
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
|
:face 'doom-modeline-warning)
|
||||||
doom-modeline-vspc
|
(propertize "#"
|
||||||
(propertize (number-to-string mu4e-alert-mode-line)
|
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
|
||||||
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
|
doom-modeline-vspc
|
||||||
'mouse-face '(:box 0)
|
(propertize (length mails)
|
||||||
'help-echo (if (= mu4e-alert-mode-line 1)
|
'face '(:inherit (doom-modeline-warning doom-modeline-unread-number))))
|
||||||
"You have an unread email"
|
'mouse-face '(:box 0)
|
||||||
(format "You have %s unread emails" mu4e-alert-mode-line)))
|
'help-echo (if (= mu4e-alert-mode-line 1)
|
||||||
" "))))
|
"You have an unread email"
|
||||||
|
(format "You have %s unread emails" mu4e-alert-mode-line)))
|
||||||
|
" "))))))
|
||||||
|
|
||||||
(defun doom-modeline-override-mu4e-alert-modeline (&rest _)
|
(defun doom-modeline-override-mu4e-alert-modeline (&rest _)
|
||||||
"Delete `mu4e-alert-mode-line' from global modeline string."
|
"Delete `mu4e-alert-mode-line' from global modeline string."
|
||||||
|
|
Loading…
Reference in a new issue