From cf759f6b46a23732ad151abac466740ccc9fc7aa Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 12 Jun 2021 22:14:32 +0100 Subject: accidentally removed ednc setup is back --- email.org | 18 ++++++------------ init.org | 13 ++++++++++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/email.org b/email.org index f527f9b..a4d9bce 100644 --- a/email.org +++ b/email.org @@ -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) diff --git a/init.org b/init.org index 4f138cb..ae1c606 100644 --- a/init.org +++ b/init.org @@ -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 -- cgit v1.2.3