Split mu4e config to be more readable
Remove mu4e-alert, using mu4e builtin modeline and notification support Add mu4e iCalendar integration
This commit is contained in:
parent
ceb5b1f4c9
commit
3863a5ecef
345
README.org
345
README.org
|
@ -1040,8 +1040,9 @@ Set fill column to 88 and enable display in python buffers
|
|||
message-send-mail-function #'message-send-mail-with-sendmail
|
||||
message-auto-save-directory nil
|
||||
message-kill-buffer-on-exit t
|
||||
mail-user-agent 'mu4e-user-agent
|
||||
read-mail-command 'mu4e)
|
||||
mail-user-agent 'mu4e-user-agent)
|
||||
|
||||
(set-variable read-mail-command 'mu4e)
|
||||
|
||||
(use-package mu4e
|
||||
:bind (("C-c m" . mu4e)
|
||||
|
@ -1089,152 +1090,14 @@ Set fill column to 88 and enable display in python buffers
|
|||
list
|
||||
personal))
|
||||
:config
|
||||
(setq
|
||||
mu4e-use-fancy-chars t
|
||||
mu4e-modeline-all-read '("R:" . " ")
|
||||
mu4e-modeline-all-clear '("C:" . " ")
|
||||
mu4e-modeline-new-items '("N:" . " ")
|
||||
mu4e-modeline-unread-items '("U:" . " ")
|
||||
mu4e-search-full-label '("F" . " ")
|
||||
mu4e-search-hide-label '("H" . " ")
|
||||
mu4e-search-related-label '("R" . " ")
|
||||
mu4e-search-skip-duplicates-label '("D" . " ")
|
||||
mu4e-search-threaded-label'("T" . " ")
|
||||
mu4e-headers-draft-mark '("D" . " ")
|
||||
mu4e-headers-flagged-mark '("F" . " ")
|
||||
mu4e-headers-unread-mark '("u" . " ")
|
||||
mu4e-headers-passed-mark '("P" . " ")
|
||||
mu4e-headers-replied-mark '("R" . " ")
|
||||
mu4e-headers-trashed-mark '("T" . " ")
|
||||
mu4e-headers-attach-mark '("a" . " ")
|
||||
mu4e-headers-calendar-mark '("c" . " ")
|
||||
mu4e-headers-encrypted-mark '("x" . " ")
|
||||
mu4e-headers-signed-mark '("s" . " ")
|
||||
mu4e-headers-list-mark '("l" . " ")
|
||||
mu4e-headers-personal-mark '("p" . " ")
|
||||
mu4e-headers-seen-mark '("S" . " ")
|
||||
mu4e-headers-new-mark '("N" . " ")
|
||||
mu4e-headers-from-or-to-prefix '(" " . "To ")
|
||||
mu4e-headers-thread-root-prefix '("* " . "* ")
|
||||
mu4e-headers-thread-duplicate-prefix '("= " . "= ")
|
||||
mu4e-headers-thread-blank-prefix '(" " . " ")
|
||||
mu4e-headers-thread-single-orphan-prefix '("─>" . "─▶")
|
||||
mu4e-headers-thread-orphan-prefix '("┬>" . "┬▶")
|
||||
mu4e-headers-thread-connection-prefix '("│ " . "│ ")
|
||||
mu4e-headers-thread-first-child-prefix '("├>" . "├▶")
|
||||
mu4e-headers-thread-child-prefix '("├>" . "├▶")
|
||||
mu4e-headers-thread-last-child-prefix '("└>" . "╰▶")
|
||||
mu4e-marks '((refile :char
|
||||
("r" . " ")
|
||||
:prompt "refile" :dyn-target
|
||||
(lambda
|
||||
(target msg)
|
||||
(mu4e-get-refile-folder msg))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"-N")))
|
||||
(delete :char
|
||||
("D" . " ")
|
||||
:prompt "Delete" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"delete")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-remove docid)))
|
||||
(flag :char
|
||||
("+" . " ")
|
||||
:prompt "+flag" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"flag")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "+F-u-N")))
|
||||
(move :char
|
||||
("m" . " ")
|
||||
:prompt "move" :ask-target mu4e--mark-get-move-target :action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"-N")))
|
||||
(read :char
|
||||
("!" . " ")
|
||||
:prompt "!read" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"read")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "+S-u-N")))
|
||||
(trash :char
|
||||
("d" . " ")
|
||||
:prompt "dtrash" :dyn-target
|
||||
(lambda
|
||||
(target msg)
|
||||
(mu4e-get-trash-folder msg))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"+T-N")))
|
||||
(unflag :char
|
||||
("-" . " ")
|
||||
:prompt "-unflag" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"unflag")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-F-N")))
|
||||
(untrash :char
|
||||
("=" . " ")
|
||||
:prompt "=untrash" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"untrash")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-T")))
|
||||
(unread :char
|
||||
("?" . " ")
|
||||
:prompt "?unread" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"unread")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-S+u-N")))
|
||||
(unmark :char " " :prompt "unmark" :action
|
||||
(mu4e-error "No action for unmarking"))
|
||||
(action :char
|
||||
("a" . " ")
|
||||
:prompt "action" :ask-target
|
||||
(lambda nil
|
||||
(mu4e-read-option "Action: " mu4e-headers-actions))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg actionfunc)
|
||||
(save-excursion
|
||||
(when
|
||||
(mu4e~headers-goto-docid docid)
|
||||
(mu4e-headers-action actionfunc)))))
|
||||
(something :char
|
||||
("*" . " ")
|
||||
:prompt "*something" :action
|
||||
(mu4e-error "No action for deferred mark"))))
|
||||
(require 'mu4e-org)
|
||||
(setq mu4e-use-fancy-chars t)
|
||||
|
||||
)
|
||||
#+END_SRC
|
||||
*** Account contexts
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(require 'mu4e-context)
|
||||
(setq mu4e-contexts
|
||||
(list
|
||||
(make-mu4e-context
|
||||
|
@ -1268,14 +1131,188 @@ Set fill column to 88 and enable display in python buffers
|
|||
(mu4e-drafts-folder . "/Outlook/Drafts")
|
||||
(mu4e-trash-folder . "/Outlook/Trash")
|
||||
(mu4e-refile-folder . "/Outlook/Archive"))))))
|
||||
#+end_src
|
||||
|
||||
(use-package mu4e-alert
|
||||
:after (mu4e alert)
|
||||
:config
|
||||
(mu4e-alert-set-default-style 'libnotify)
|
||||
(mu4e-alert-enable-notifications))
|
||||
*** Modeline configuration
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(require 'mu4e-modeline)
|
||||
(setq mu4e-modeline-all-read '("R:" . " ")
|
||||
mu4e-modeline-all-clear '("C:" . " ")
|
||||
mu4e-modeline-new-items '("N:" . " ")
|
||||
mu4e-modeline-unread-items '("U:" . " "))
|
||||
(mu4e-modeline-mode +1))
|
||||
#+end_src
|
||||
|
||||
#+END_SRC
|
||||
*** Headers mode glyphs
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(setq mu4e-search-full-label '("F" . " ")
|
||||
mu4e-search-hide-label '("H" . " ")
|
||||
mu4e-search-related-label '("R" . " ")
|
||||
mu4e-search-skip-duplicates-label '("D" . " ")
|
||||
mu4e-search-threaded-label'("T" . " ")
|
||||
mu4e-headers-draft-mark '("D" . " ")
|
||||
mu4e-headers-flagged-mark '("F" . " ")
|
||||
mu4e-headers-unread-mark '("u" . " ")
|
||||
mu4e-headers-passed-mark '("P" . " ")
|
||||
mu4e-headers-replied-mark '("R" . " ")
|
||||
mu4e-headers-trashed-mark '("T" . " ")
|
||||
mu4e-headers-attach-mark '("a" . " ")
|
||||
mu4e-headers-calendar-mark '("c" . " ")
|
||||
mu4e-headers-encrypted-mark '("x" . " ")
|
||||
mu4e-headers-signed-mark '("s" . " ")
|
||||
mu4e-headers-list-mark '("l" . " ")
|
||||
mu4e-headers-personal-mark '("p" . " ")
|
||||
mu4e-headers-seen-mark '("S" . " ")
|
||||
mu4e-headers-new-mark '("N" . " ")
|
||||
mu4e-headers-from-or-to-prefix '(" " . "To ")
|
||||
mu4e-headers-thread-root-prefix '("* " . "* ")
|
||||
mu4e-headers-thread-duplicate-prefix '("= " . "= ")
|
||||
mu4e-headers-thread-blank-prefix '(" " . " ")
|
||||
mu4e-headers-thread-single-orphan-prefix '("─>" . "─▶")
|
||||
mu4e-headers-thread-orphan-prefix '("┬>" . "┬▶")
|
||||
mu4e-headers-thread-connection-prefix '("│ " . "│ ")
|
||||
mu4e-headers-thread-first-child-prefix '("├>" . "├▶")
|
||||
mu4e-headers-thread-child-prefix '("├>" . "├▶")
|
||||
mu4e-headers-thread-last-child-prefix '("└>" . "╰▶")))
|
||||
#+end_src
|
||||
|
||||
**** Custom marks
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(setq mu4e-marks '((refile :char
|
||||
("r" . " ")
|
||||
:prompt "refile" :dyn-target
|
||||
(lambda
|
||||
(target msg)
|
||||
(mu4e-get-refile-folder msg))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"-N")))
|
||||
(delete :char
|
||||
("D" . " ")
|
||||
:prompt "Delete" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"delete")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-remove docid)))
|
||||
(flag :char
|
||||
("+" . " ")
|
||||
:prompt "+flag" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"flag")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "+F-u-N")))
|
||||
(move :char
|
||||
("m" . " ")
|
||||
:prompt "move" :ask-target mu4e--mark-get-move-target :action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"-N")))
|
||||
(read :char
|
||||
("!" . " ")
|
||||
:prompt "!read" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"read")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "+S-u-N")))
|
||||
(trash :char
|
||||
("d" . " ")
|
||||
:prompt "dtrash" :dyn-target
|
||||
(lambda
|
||||
(target msg)
|
||||
(mu4e-get-trash-folder msg))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid
|
||||
(mu4e--mark-check-target target)
|
||||
"+T-N")))
|
||||
(unflag :char
|
||||
("-" . " ")
|
||||
:prompt "-unflag" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"unflag")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-F-N")))
|
||||
(untrash :char
|
||||
("=" . " ")
|
||||
:prompt "=untrash" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"untrash")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-T")))
|
||||
(unread :char
|
||||
("?" . " ")
|
||||
:prompt "?unread" :show-target
|
||||
(lambda
|
||||
(target)
|
||||
"unread")
|
||||
:action
|
||||
(lambda
|
||||
(docid msg target)
|
||||
(mu4e--server-move docid nil "-S+u-N")))
|
||||
(unmark :char " " :prompt "unmark" :action
|
||||
(mu4e-error "No action for unmarking"))
|
||||
(action :char
|
||||
("a" . " ")
|
||||
:prompt "action" :ask-target
|
||||
(lambda nil
|
||||
(mu4e-read-option "Action: " mu4e-headers-actions))
|
||||
:action
|
||||
(lambda
|
||||
(docid msg actionfunc)
|
||||
(save-excursion
|
||||
(when
|
||||
(mu4e~headers-goto-docid docid)
|
||||
(mu4e-headers-action actionfunc)))))
|
||||
(something :char
|
||||
("*" . " ")
|
||||
:prompt "*something" :action
|
||||
(mu4e-error "No action for deferred mark")))))
|
||||
#+end_src
|
||||
|
||||
*** Desktop notifications
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(require 'mu4e-notification)
|
||||
(setq mu4e-notification-support t))
|
||||
#+end_src
|
||||
|
||||
*** Org-mode integration
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(require 'mu4e-org))
|
||||
#+end_src
|
||||
|
||||
*** iCalendar integration
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'mu4e
|
||||
(require 'mu4e-icalendar)
|
||||
(mu4e-icalendar-setup)
|
||||
(setq mu4e-icalendar-trash-after-reply nil))
|
||||
#+end_src
|
||||
|
||||
** TODO Feeds
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
Loading…
Reference in a new issue