mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-05 17:31:37 -05:00
Added ability to exclude gnus groups from unread count
This commit is contained in:
parent
96350f6f81
commit
5090426eb2
2 changed files with 8 additions and 1 deletions
|
@ -360,6 +360,12 @@ If nil, don't set up a hook."
|
||||||
:type 'integer
|
:type 'integer
|
||||||
:group 'doom-modeline)
|
:group 'doom-modeline)
|
||||||
|
|
||||||
|
(defcustom doom-modeline-gnus-excluded-groups nil
|
||||||
|
"A list of groups to be excluded from the unread count."
|
||||||
|
|
||||||
|
:type '(repeat string)
|
||||||
|
:group 'doom-modeline)
|
||||||
|
|
||||||
(defcustom doom-modeline-irc t
|
(defcustom doom-modeline-irc t
|
||||||
"Whether display the irc notifications.
|
"Whether display the irc notifications.
|
||||||
|
|
||||||
|
|
|
@ -2149,7 +2149,8 @@ mouse-1: Toggle Debug on Quit"
|
||||||
(let* ((group (car g))
|
(let* ((group (car g))
|
||||||
;; `gnus-group-unread' is a macro
|
;; `gnus-group-unread' is a macro
|
||||||
(unread (car (gethash group gnus-newsrc-hashtb))))
|
(unread (car (gethash group gnus-newsrc-hashtb))))
|
||||||
(when (and (numberp unread)
|
(when (and (not (seq-contains-p doom-modeline-gnus-excluded-groups group))
|
||||||
|
(numberp unread)
|
||||||
(> unread 0))
|
(> unread 0))
|
||||||
(setq total-unread-news-number (+ total-unread-news-number unread)))))
|
(setq total-unread-news-number (+ total-unread-news-number unread)))))
|
||||||
gnus-newsrc-alist)
|
gnus-newsrc-alist)
|
||||||
|
|
Loading…
Add table
Reference in a new issue