more mu4e config
This commit is contained in:
parent
100428d695
commit
8776cb585d
3 changed files with 69 additions and 29 deletions
81
config.el
81
config.el
|
@ -259,6 +259,19 @@
|
|||
(smtpmail-default-smtp-server . "smtp.fastmail.com")
|
||||
(smtpmail-smtp-server . "smtp.fastmail.com")
|
||||
(smtpmail-local-domain . "fastmail.com"))
|
||||
t)
|
||||
|
||||
(set-email-account! "admin@studyoftime.org"
|
||||
'((mu4e-sent-folder . "/admin@studyoftime.org/Sent")
|
||||
(mu4e-drafts-folder . "/admin@studyoftime.org/Drafts")
|
||||
(mu4e-trash-folder . "/admin@studyoftime.org/Trash")
|
||||
(mu4e-refile-folder . "/admin@studyoftime.org/Archive")
|
||||
(mu4e-spam-folder . "/admin@studyoftime.org/Spam")
|
||||
(smtpmail-smtp-user . "admin@studyoftime.org")
|
||||
(user-mail-address . "admin@studyoftime.org") ;; only needed for mu < 1.4
|
||||
(smtpmail-default-smtp-server . "smtp.dreamhost.com")
|
||||
(smtpmail-smtp-server . "smtp.dreamhost.com")
|
||||
(smtpmail-local-domain . "dreamhost.com"))
|
||||
t)
|
||||
|
||||
(defun message-insert-signature-at-point ()
|
||||
|
@ -272,23 +285,20 @@
|
|||
(setq message-signature nil))
|
||||
|
||||
(use-package! consult-mu
|
||||
:defer-incrementally mu4e
|
||||
:custom
|
||||
;;maximum number of results shown in minibuffer
|
||||
(consult-mu-maxnum 200)
|
||||
;;show preview when pressing any keys
|
||||
(consult-mu-preview-key 'any)
|
||||
;;do not mark email as read when previewed. If you turn this to t, be aware that the auto-loaded preview if the preview-key above is 'any would also get marked as read!
|
||||
(consult-mu-mark-previewed-as-read nil)
|
||||
;;mark email as read when selected.
|
||||
;; (consult-mu-mark-viewed-as-read t)
|
||||
;;use reply to all when composing reply emails
|
||||
(consult-mu-use-wide-reply t)
|
||||
;; define a template for headers view in minibuffer. The example below adjusts the width based on the width of the screen.
|
||||
|
||||
(consult-mu-headers-template (lambda () (concat "%f" (number-to-string (floor (* (frame-width) 0.15))) "%s" (number-to-string (floor (* (frame-width) 0.5))) "%d13" "%g" "%x")))
|
||||
(consult-mu-action #'consult-mu--view-action)
|
||||
|
||||
:config
|
||||
;;create a list of saved searches for quick access using `histroy-next-element' with `M-n' in minibuffer. Note the "#" character at the beginning of each query! Change these according to
|
||||
(setq consult-mu-saved-searches-dynamics '("#flag:unread"))
|
||||
(setq consult-mu-saved-searches-async '("#flag:unread"))
|
||||
;; require embark actions for marking, replying, forwarding, etc. directly from minibuffer
|
||||
|
@ -309,8 +319,19 @@
|
|||
;; choose if you want to use dired for attaching files (choice of 'always, 'in-dired, or nil)
|
||||
(setq consult-mu-compose-use-dired-attachment 'in-dired))
|
||||
|
||||
(use-package! mu4e
|
||||
:defer-incrementally t
|
||||
:config
|
||||
|
||||
;; Run mu4e in the background to sync mail periodically
|
||||
;; (mu4e t)
|
||||
|
||||
;; tell meow to start mu4e in motion state
|
||||
(pushnew! meow-mode-state-list '(mu4e-main-mode . motion))
|
||||
|
||||
(setq mu4e-update-interval 300
|
||||
mu4e-headers-auto-update t)
|
||||
|
||||
(after! mu4e
|
||||
(setq
|
||||
mu4e-index-cleanup t
|
||||
mu4e-index-lazy-check nil
|
||||
|
@ -334,38 +355,56 @@
|
|||
(setq mu4e-compose-format-flowed t)
|
||||
|
||||
(setq message-signature nil)
|
||||
|
||||
(add-hook! 'mu4e-compose-mode-hook
|
||||
(use-hard-newlines -1)
|
||||
;; (message-add-header "CC:")
|
||||
(message-goto-body)
|
||||
(message-insert-signature-at-point)
|
||||
(message-goto-body))
|
||||
|
||||
;; spam
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Spam"
|
||||
"Spam mail"
|
||||
?S)
|
||||
;; (setq mu4e-bookmarks
|
||||
;; '((:name "Unread messages" :query "flag:unread AND NOT flag:trashed" :key ?i)
|
||||
;; (:name "Today's messages" :query "date:today..now" :key ?t)
|
||||
;; (:name "The Boss" :query "from:stallman" :key ?s)
|
||||
;; (:name "Last 7 days" :query "date:7d..now" :hide-unread t :key ?w)
|
||||
;; (:name "Messages with images" :query "mime:image/*" :key ?p)))
|
||||
|
||||
;; sent
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Sent"
|
||||
"Sent mail"
|
||||
?s)
|
||||
|
||||
;; unread
|
||||
(mu4e-bookmark-define
|
||||
(concat "flag:unread"
|
||||
" and not maildir:/matt@emenel.ca/Spam"
|
||||
" and not maildir:/matt@emenel.ca/Trash")
|
||||
" and not maildir:/matt@emenel.ca/Trash"
|
||||
" and not maildir:/admin@studyoftime.org/Spam"
|
||||
" and not maildir:/admin@studyoftime.org/Trash")
|
||||
"All Unread"
|
||||
?U)
|
||||
|
||||
(mu4e-bookmark-define
|
||||
(concat "flag:unread"
|
||||
" and not maildir:/matt@emenel.ca/Spam"
|
||||
" and not maildir:/matt@emenel.ca/Trash"
|
||||
" and not maildir:/matt@emenel.ca/Archive"
|
||||
" and not maildir:/admin@studyoftime.org/Spam"
|
||||
" and not maildir:/admin@studyoftime.org/Trash"
|
||||
" and not maildir:/admin@studyoftime.org/Archive")
|
||||
"Inboxes Unread"
|
||||
?u)
|
||||
|
||||
;; inboxes
|
||||
;; inboxes
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Inbox"
|
||||
(concat "maildir:/matt@emenel.ca/Inbox"
|
||||
" or maildir:/admin@studyoftime.org/Inbox")
|
||||
"All Inboxes"
|
||||
?i)
|
||||
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'((:maildir "/matt@emenel.ca/Inbox" :key ?1 :name "Inbox/matt@emenel.ca")
|
||||
(:maildir "/matt@emenel.ca/Sent" :key ?2 :name "Sent/matt@emenel.ca")
|
||||
(:maildir "/matt@emenel.ca/Spam" :key ?3 :name "Spam/matt@emenel.ca")
|
||||
(:maildir "/admin@studyoftime.org/Inbox" :key ?4 :name "Inbox/admin@studyoftime.org")
|
||||
(:maildir "/admin@studyoftime.org/Sent" :key ?5 :name "Sent/admin@studyoftime.org")
|
||||
(:maildir "/admin@studyoftime.org/Spam" :key ?6 :name "Spam/admin@studyoftime.org")))
|
||||
|
||||
(add-hook! mu4e-compose-mode
|
||||
(ws-butler-mode -1)))
|
||||
|
||||
|
|
|
@ -9,14 +9,10 @@
|
|||
"?" #'meow-cheatsheet))
|
||||
|
||||
(defun meow/setup-qwerty ()
|
||||
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
|
||||
(meow-motion-overwrite-define-key
|
||||
'("j" . meow-next)
|
||||
'("k" . meow-prev))
|
||||
(meow-leader-define-key
|
||||
;; SPC j/k will run the original command in MOTION state.
|
||||
'("j" . "H-j")
|
||||
'("k" . "H-k")))
|
||||
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty))
|
||||
;; (meow-motion-overwrite-define-key
|
||||
;; '("j" . meow-next)
|
||||
;; '("k" . meow-prev)))
|
||||
|
||||
(defun meow--eval-sexp ()
|
||||
(interactive)
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
|
||||
(package! consult-mu
|
||||
:recipe (:host nil :type git :repo "https://gt.emenel.ca/emenel/consult-mu.git" :files (:defaults "extras/*.el")))
|
||||
(package! mu4e-alert)
|
||||
(package! mu4e-overview
|
||||
:recipe (:type git
|
||||
:host github
|
||||
:repo "mkcms/mu4e-overview"))
|
||||
|
||||
(package! just-mode)
|
||||
(package! justl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue