summaryrefslogtreecommitdiffhomepage
path: root/custom/jao-custom-gnus.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-10-02 17:45:51 +0100
committerjao <jao@gnu.org>2025-10-02 17:45:51 +0100
commit2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08 (patch)
treeab0e1b61a1a50bae84323e6a58f3ad555c31654d /custom/jao-custom-gnus.el
parentc308a35f7cff2c8360473a89a80e5b1c766d00c8 (diff)
downloadelibs-2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08.tar.gz
elibs-2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08.tar.bz2
nnw badge in gnus notifications
Diffstat (limited to 'custom/jao-custom-gnus.el')
-rw-r--r--custom/jao-custom-gnus.el36
1 files changed, 23 insertions, 13 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index 4535fd3..f8a396d 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -201,7 +201,7 @@
(mapcar (lambda (b)
`(imap :server "127.0.0.1" :port 1143
:user "jaor@pm.me" :password ,pwd
- :stream starttls :predicate "DELETED UNSEEN"
+ :stream starttls :predicate ""
:fetchflag ""
:mailbox ,(if b (concat "Folders/" b) "INBOX")))
(or folders '(nil "drivel" "hacking" "bills" "prog" "words"))))
@@ -658,18 +658,21 @@
(let ((feeds (thread-first
(directory-files mail-source-directory nil "feeds\\.[^e]")
(seq-difference '("feeds.trove")))))
- `(("nnml:bigml\\.inbox" "B" jao-themes-f00)
- ("nnml:bigml\\.alba" "A" jao-themes-f00)
- ("nnml:bigml\\.ryou" "R" jao-themes-f00)
- ("nnml:bigml\\.bugs" "b" jao-themes-error)
- ("nnml:bigml\\.support" "S" default)
- ("nnml:bigml\\.[^aibsr]" "W" jao-themes-dimm)
+ `(
+ ;; ("nnml:bigml\\.inbox" "B" jao-themes-f00)
+ ;; ("nnml:bigml\\.alba" "A" jao-themes-f00)
+ ;; ("nnml:bigml\\.ryou" "R" jao-themes-f00)
+ ;; ("nnml:bigml\\.bugs" "b" jao-themes-error)
+ ;; ("nnml:bigml\\.support" "S" default)
+ ;; ("nnml:bigml\\.[^aibsr]" "W" jao-themes-dimm)
+ ("nnml:jao\\.bigml" "B" jao-themes-f00)
("nnml:jao\\.\\(inbox\\|trove\\)" "I" jao-themes-f01)
- ("nnml:jao.hacking" "H" jao-themes-dimm)
+ ("nnml:jao.hunting" "H" jao-themes-f02)
("nnml:jao.write" "W" jao-themes-warning)
("nnml:jao.[^ithw]" "J" jao-themes-dimm)
+ ("nnml:jao.hacking" "J" jao-themes-dimm)
(,(format "^nnml:%s" (regexp-opt feeds)) "F" jao-themes-dimm)
- ("feeds\\.e" "E" jao-themes-dimm)
+ ;; ("feeds\\.e" "E" jao-themes-dimm)
("nnml:local" "l" jao-themes-dimm)
("nnrss:.*" "R" jao-themes-dimm)
("^\\(gwene\\|gmane\\)\\." "N" jao-themes-dimm))))
@@ -690,12 +693,19 @@
(defvar jao-gnus--notify-strs ())
+(defun jao-gnus--nnw-count ()
+ (jao-when-darwin
+ (when-let* ((n (jao-nnw-unread-count)))
+ (when (> n 0) (list (format "(%s)" n))))))
+
(defun jao-gnus--notify-strs ()
(let ((counts (jao-gnus--unread-counts)))
- (seq-filter #'identity
- (seq-map (lambda (args)
- (apply 'jao-gnus--unread-label counts args))
- jao-gnus-tracked-groups))))
+ (append
+ (seq-filter #'identity
+ (seq-map (lambda (args)
+ (apply 'jao-gnus--unread-label counts args))
+ jao-gnus-tracked-groups))
+ (jao-gnus--nnw-count))))
(defun jao-gnus--notify ()
(setq jao-gnus--notify-strs (jao-gnus--notify-strs))