diff options
-rw-r--r-- | email.org | 18 | ||||
-rw-r--r-- | init.org | 13 |
2 files changed, 18 insertions, 13 deletions
@@ -250,17 +250,17 @@ #+end_src * mailboxes #+begin_src emacs-lisp - (defun jao-list-mailboxes (base) + (defun jao-list-mailboxes (base &rest excl) (let ((dir (expand-file-name base "~/var/mail"))) - (seq-difference (directory-files dir) '("." ".." "trash" "spam")))) + (seq-difference (directory-files dir) (append '("." "..") excl)))) - (defun jao-mailbox-folders () + (defun jao-mailbox-folders (&rest excl) (seq-mapcat (lambda (base) (mapcar `(lambda (d) (format "%s/%s" ,base d)) - (jao-list-mailboxes base))) + (apply #'jao-list-mailboxes base excl))) '("jao" "bigml" "feeds" "trove"))) - (defvar jao-mailbox-folders (jao-mailbox-folders)) + (defvar jao-mailbox-folders (jao-mailbox-folders "trash" "spam")) (defvar jao-mailbox-folders-rx (regexp-opt jao-mailbox-folders)) #+end_src * consult narrowing @@ -485,7 +485,7 @@ #+begin_src emacs-lisp (use-package jao-notmuch :demand t - :config (setq jao-notmuch-mailboxes jao-mailbox-folders)) + :config (setq jao-notmuch-mailboxes (jao-mailbox-folders))) (use-package notmuch-tree :config @@ -504,12 +504,6 @@ (advice-add 'notmuch-tree-format-field :around #'jao-notmuch--format-field) - (defun jao-notmuch-echo-count () - (interactive) - (when-let ((n (jao-notmuch--unread-count))) - (jao-notmuch-tree-update-buffer-name n) - (message "%s messages left" n))) - :bind (:map notmuch-tree-mode-map (("." . jao-notmuch-toggle-mime-parts) ("C" . jao-notmuch-echo-count) @@ -708,7 +708,18 @@ :diminish) (use-package jao-ednc - :demand t) + :after ednc + :commands (jao-ednc-setup) + :config + (jao-ednc-ignore-app "Spotify") + (jao-ednc-ignore-app "NetworkManager") + (defhydra jao-hydra-ednc (:color blue) + "Notifications" + ("s" jao-ednc-show "show last") + ("d" jao-ednc-dismiss "dismiss last") + ("D" jao-ednc-dismiss-all "dismiss all") + ("i" jao-ednc-invoke-last-action "invoke last action") + ("n" jao-ednc-pop "show all"))) #+end_src * Calendar, diary, weather *** Diary |