diff options
author | David Runge <dave@sleepmap.de> | 2022-05-01 11:21:44 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2022-05-01 16:18:04 +0200 |
commit | a514a615c56d94211efe62ea1f3ce31f10d65629 (patch) | |
tree | 7a76e2b8b52c9cdfc24948c45c5981cf69921734 /.config/mutt | |
parent | 707b4455c7002d84cb0b16e33d67320f03a47145 (diff) | |
download | dotfiles-a514a615c56d94211efe62ea1f3ce31f10d65629.tar.gz dotfiles-a514a615c56d94211efe62ea1f3ce31f10d65629.tar.bz2 dotfiles-a514a615c56d94211efe62ea1f3ce31f10d65629.tar.xz dotfiles-a514a615c56d94211efe62ea1f3ce31f10d65629.zip |
mutt: Use XDG compliant config location
.config/mutt/*:
Use XDG_CONFIG_DIR compliant config location
Diffstat (limited to '.config/mutt')
-rw-r--r-- | .config/mutt/accounts.rc | 7 | ||||
-rw-r--r-- | .config/mutt/attachments.rc | 2 | ||||
-rw-r--r-- | .config/mutt/color.rc | 84 | ||||
-rw-r--r-- | .config/mutt/dave@sleepmap.de.rc | 12 | ||||
-rw-r--r-- | .config/mutt/dave@sleepmap.de.sig | 1 | ||||
-rw-r--r-- | .config/mutt/default.rc | 11 | ||||
-rw-r--r-- | .config/mutt/dvzrv@archlinux.org.rc | 12 | ||||
-rw-r--r-- | .config/mutt/dvzrv@archlinux.org.sig | 1 | ||||
-rw-r--r-- | .config/mutt/gpg.rc | 17 | ||||
-rw-r--r-- | .config/mutt/khard.rc | 5 | ||||
-rw-r--r-- | .config/mutt/macros.rc | 49 | ||||
-rw-r--r-- | .config/mutt/muttrc | 32 | ||||
-rw-r--r-- | .config/mutt/security.rc | 2 | ||||
-rw-r--r-- | .config/mutt/sidebar.rc | 14 | ||||
-rw-r--r-- | .config/mutt/sorting.rc | 2 |
15 files changed, 251 insertions, 0 deletions
diff --git a/.config/mutt/accounts.rc b/.config/mutt/accounts.rc new file mode 100644 index 0000000..fb8eac2 --- /dev/null +++ b/.config/mutt/accounts.rc @@ -0,0 +1,7 @@ +# dave@sleepmap.de (default) +set spoolfile = "+dave@sleepmap.de/INBOX" +source "~/.mutt/dave@sleepmap.de.rc" +folder-hook dave@sleepmap.de/* source ~/.mutt/dave@sleepmap.de.rc + +# dvzrv@archlinux.org +folder-hook dvzrv@archlinux.org/* source ~/.mutt/dvzrv@archlinux.org.rc diff --git a/.config/mutt/attachments.rc b/.config/mutt/attachments.rc new file mode 100644 index 0000000..693f174 --- /dev/null +++ b/.config/mutt/attachments.rc @@ -0,0 +1,2 @@ +set mime_forward=yes +set mime_forward_rest=yes diff --git a/.config/mutt/color.rc b/.config/mutt/color.rc new file mode 100644 index 0000000..b413dca --- /dev/null +++ b/.config/mutt/color.rc @@ -0,0 +1,84 @@ +# Colors for items in the index +color index brightcyan default ~N +color index brightred default ~O +color index brightyellow default ~F +color index black green ~T +color index brightred default ~D +mono index bold ~N +mono index bold ~F +mono index bold ~T +mono index bold ~D + +# Highlights inside the body of a message. + +# URLs +color body brightgreen default "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body brightgreen default "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +# Email addresses. +color body brightgreen default "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +# Header +color header green default "^from:" +color header green default "^to:" +color header green default "^cc:" +color header green default "^date:" +color header yellow default "^newsgroups:" +color header yellow default "^reply-to:" +color header brightcyan default "^subject:" +color header red default "^x-spam-rule:" +color header green default "^x-mailer:" +color header yellow default "^message-id:" +color header yellow default "^Organization:" +color header yellow default "^Organisation:" +color header yellow default "^User-Agent:" +color header yellow default "^message-id: .*pine" +color header yellow default "^X-Fnord:" +color header yellow default "^X-WebTV-Stationery:" + +color header red default "^x-spam-rule:" +color header green default "^x-mailer:" +color header yellow default "^message-id:" +color header yellow default "^Organization:" +color header yellow default "^Organisation:" +color header yellow default "^User-Agent:" +color header yellow default "^message-id: .*pine" +color header yellow default "^X-Fnord:" +color header yellow default "^X-WebTV-Stationery:" +color header yellow default "^X-Message-Flag:" +color header yellow default "^X-Spam-Status:" +color header yellow default "^X-SpamProbe:" +color header red default "^X-SpamProbe: SPAM" + +# Coloring quoted text - coloring the first 7 levels: +color quoted cyan default +color quoted1 yellow default +color quoted2 red default +color quoted3 green default +color quoted4 cyan default +color quoted5 yellow default +color quoted6 red default +color quoted7 green default + +# Default color definitions +#color hdrdefault white green +color signature brightmagenta default +color indicator black cyan +color attachment black green +color error red default +color message white default +color search brightwhite magenta +color status brightyellow blue +color tree brightblue default +color normal white default +color tilde green default +color bold brightyellow default +color underline magenta default +color markers brightcyan default + +# Color definitions when on a mono screen +mono bold bold +mono underline underline +mono indicator reverse diff --git a/.config/mutt/dave@sleepmap.de.rc b/.config/mutt/dave@sleepmap.de.rc new file mode 100644 index 0000000..402f92f --- /dev/null +++ b/.config/mutt/dave@sleepmap.de.rc @@ -0,0 +1,12 @@ +set from = "David Runge <dave@sleepmap.de>" +set sendmail = "/usr/bin/msmtp -a sleepmap.de" +set folder = "~/.mail/dave@sleepmap.de" +set spoolfile = "+INBOX" +set postponed = "+Drafts" +set record = "+Sent" +set realname = "David Runge" +set signature = "~/.mutt/dave@sleepmap.de.sig" +set pgp_default_key = '1793DAD5D803A8FFD7451697BB992F9864FAD168' + +color status green default + diff --git a/.config/mutt/dave@sleepmap.de.sig b/.config/mutt/dave@sleepmap.de.sig new file mode 100644 index 0000000..b50b097 --- /dev/null +++ b/.config/mutt/dave@sleepmap.de.sig @@ -0,0 +1 @@ +https://sleepmap.de diff --git a/.config/mutt/default.rc b/.config/mutt/default.rc new file mode 100644 index 0000000..48156bd --- /dev/null +++ b/.config/mutt/default.rc @@ -0,0 +1,11 @@ +set editor=`echo \$EDITOR` +set folder = "~/.mail" +set mbox_type = Maildir + +set date_format = "%F %T (%Z)" +set index_format = "%4C %D %Z %-15.15L (%?l?%4l&%4c?) %s" +set folder_format = "%2C %N %2l %-8.8u %-8.8g %8s %d %f" +set send_charset="utf-8" + +auto_view text/html # view html automatically +alternative_order text/plain text/enriched text/html # save html for last diff --git a/.config/mutt/dvzrv@archlinux.org.rc b/.config/mutt/dvzrv@archlinux.org.rc new file mode 100644 index 0000000..ab6ce25 --- /dev/null +++ b/.config/mutt/dvzrv@archlinux.org.rc @@ -0,0 +1,12 @@ +set from = "David Runge <dvzrv@archlinux.org>" +set sendmail = "/usr/bin/msmtp -a archlinux.org" +set folder = "~/.mail/dvzrv@archlinux.org" +set spoolfile = "+INBOX" +set postponed = "+Drafts" +set record = "+Sent" +set realname = "David Runge" +set signature = "~/.mutt/dvzrv@archlinux.org.sig" +set pgp_default_key = 'C7E7849466FE2358343588377258734B41C31549' + +color status green default + diff --git a/.config/mutt/dvzrv@archlinux.org.sig b/.config/mutt/dvzrv@archlinux.org.sig new file mode 100644 index 0000000..23af390 --- /dev/null +++ b/.config/mutt/dvzrv@archlinux.org.sig @@ -0,0 +1 @@ +https://archlinux.org diff --git a/.config/mutt/gpg.rc b/.config/mutt/gpg.rc new file mode 100644 index 0000000..502de7b --- /dev/null +++ b/.config/mutt/gpg.rc @@ -0,0 +1,17 @@ +set pgp_good_sign="^gpg: Good signature from " +set pgp_use_gpg_agent = yes +set pgp_self_encrypt = yes +set pgp_default_key = '1793DAD5D803A8FFD7451697BB992F9864FAD168' +set pgp_timeout = 60 +set pgp_verify_command = "gpg --batch --output - --verify %s %f" +set crypt_use_gpgme = yes +set crypt_autosign = yes +set crypt_replyencrypt = yes +set crypt_replysignencrypted = yes +set crypt_protected_headers_write = yes + +# add message-hook for non standard-compliant (old) gnupg style messages +message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp" + +send-hook . 'reset crypt_autoencrypt' +source "~/.mutt/gpg-auto.rc" diff --git a/.config/mutt/khard.rc b/.config/mutt/khard.rc new file mode 100644 index 0000000..12c9b39 --- /dev/null +++ b/.config/mutt/khard.rc @@ -0,0 +1,5 @@ +# auto-completing mails when pressing tab in "new mail" dialog using khard address books +set query_command= "khard email -p -s last_name -d first_name %s" +bind editor <Tab> complete-query +bind editor ^T complete + diff --git a/.config/mutt/macros.rc b/.config/mutt/macros.rc new file mode 100644 index 0000000..83dd9d0 --- /dev/null +++ b/.config/mutt/macros.rc @@ -0,0 +1,49 @@ + +# source folder settings and enter folder +macro index,pager <F2> '<sync-mailbox><enter-command>source ~/.mutt/dave@sleepmap.de.rc<enter><change-folder>!<enter>' +macro index,pager <F3> '<sync-mailbox><enter-command>source ~/.mutt/dvzrv@archlinux.org.rc<enter><change-folder>!<enter>' + +macro attach W \ + "<save-entry><bol>~/Downloads/<eol>" \ + "Save attachment to ~/Downloads." + +macro index D \ + "<tag-prefix><save-message>+Trash<enter>" \ + "Move message to Trash" + +macro index S \ + "<tag-prefix><save-message>+Spam<enter>" \ + "Move message to Spam." + +macro index I \ + "<tag-prefix><save-message>=Archives/INBOX/2020<enter><sync-mailbox>" \ + "Archive tagged INBOX message(s) in Archives.INBOX.2020" + +macro index G \ + "<tag-prefix><save-message>=Archives/Sent/2020<enter><sync-mailbox>" \ + "Archive tagged Sent message(s) in Archives.Sent.2020" + +macro index,pager A \ + "<pipe-message>khard add-email<return>" \ + "Add the sender email address to khard" + +macro index <F8> \ + "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ + <shell-escape>notmuch-mutt -r --prompt search<enter>\ + <change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ + <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: search mail" + +macro index <F9> \ + "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ + <pipe-message>notmuch-mutt -r thread<enter>\ + <change-folder-readonly>`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`<enter>\ + <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: reconstruct thread" + +macro index <F6> \ + "<enter-command>set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key<enter>\ + <pipe-message>notmuch-mutt tag -- -inbox<enter>\ + <enter-command>set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key<enter>" \ + "notmuch: remove message from inbox" + diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc new file mode 100644 index 0000000..f990e46 --- /dev/null +++ b/.config/mutt/muttrc @@ -0,0 +1,32 @@ +# defaults +source "~/.mutt/default.rc" + +# color +source "~/.mutt/color.rc" + +# gnupg +source "~/.mutt/gpg.rc" + +# mailboxes (set by offlineimap) +source "~/.mutt/mailboxes.rc" + +# sorting +source "~/.mutt/sorting.rc" + +# attachments +source "~/.mutt/attachments.rc" + +# khard (contacts) +source "~/.mutt/khard.rc" + +# accounts +source "~/.mutt/accounts.rc" + +# macros +source "~/.mutt/macros.rc" + +# security +source "~/.mutt/security.rc" + +# sidebar +source "~/.mutt/sidebar.rc" diff --git a/.config/mutt/security.rc b/.config/mutt/security.rc new file mode 100644 index 0000000..af00478 --- /dev/null +++ b/.config/mutt/security.rc @@ -0,0 +1,2 @@ +# disable enter-command (so password commands won't show up in command history) +bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop diff --git a/.config/mutt/sidebar.rc b/.config/mutt/sidebar.rc new file mode 100644 index 0000000..c3c130c --- /dev/null +++ b/.config/mutt/sidebar.rc @@ -0,0 +1,14 @@ +set browser_abbreviate_mailboxes = no +set sidebar_visible = yes +set sidebar_folder_indent = yes +set sidebar_short_path = yes +set sidebar_width = 30 + +macro index b '<enter-command>toggle sidebar_visible<enter><refresh>' +macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>' + +# Ctrl-n, Ctrl-p to select next, previous folder. +# Ctrl-o to open selected folder. +bind index,pager \CP sidebar-prev +bind index,pager \CN sidebar-next +bind index,pager \CO sidebar-open diff --git a/.config/mutt/sorting.rc b/.config/mutt/sorting.rc new file mode 100644 index 0000000..48827f7 --- /dev/null +++ b/.config/mutt/sorting.rc @@ -0,0 +1,2 @@ +set sort = "threads" +set sort_aux = "last-date-received" |