mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-05 09:21:38 -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
|
||||
: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
|
||||
"Whether display the irc notifications.
|
||||
|
||||
|
|
|
@ -2149,7 +2149,8 @@ mouse-1: Toggle Debug on Quit"
|
|||
(let* ((group (car g))
|
||||
;; `gnus-group-unread' is a macro
|
||||
(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))
|
||||
(setq total-unread-news-number (+ total-unread-news-number unread)))))
|
||||
gnus-newsrc-alist)
|
||||
|
|
Loading…
Add table
Reference in a new issue