diff options
author | jao <jao@gnu.org> | 2025-10-02 17:45:51 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-10-02 17:45:51 +0100 |
commit | 2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08 (patch) | |
tree | ab0e1b61a1a50bae84323e6a58f3ad555c31654d /lib/doc | |
parent | c308a35f7cff2c8360473a89a80e5b1c766d00c8 (diff) | |
download | elibs-2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08.tar.gz elibs-2c45e0f8fc8dbe29aefc3f53392c7d9d3bf54b08.tar.bz2 |
nnw badge in gnus notifications
Diffstat (limited to 'lib/doc')
-rw-r--r-- | lib/doc/jao-mac.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/doc/jao-mac.el b/lib/doc/jao-mac.el index 06d6ad3..822cdb0 100644 --- a/lib/doc/jao-mac.el +++ b/lib/doc/jao-mac.el @@ -130,6 +130,15 @@ (browse-url url)) (message "No article selected in NetNewsWire"))) +(defvar jao-nnw--label-cmd + "lsappinfo info -app NetNewsWire -only StatusLabel") + +(defun jao-nnw-unread-count () + "A very hacky, yet efficient, way of getting NNW's badge." + (let ((s (shell-command-to-string jao-nnw--label-cmd))) + (when (string-match ".*=\"\\([0-9]+\\)\" ." s) + (string-to-number (match-string 1 s))))) + ;;; Safari (defun jao-safari-current-url () (jao-mac-tell-app "Safari" "return URL of current tab of window 1")) |