From e88c9bc3d4c34c618c4a29e8d1aa49a73d17dea5 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 31 Oct 2024 21:28:30 +0530 Subject: [PATCH] mutt: Clean up and refactor configuration Refactored by stealing from https://github.com/iagox86/mutt.git --- mutt/.mutt/accounts.conf | 24 ++ mutt/.mutt/accounts/asymptotic | 11 +- mutt/.mutt/accounts/fastmail | 11 +- mutt/.mutt/accounts/sanchayan | 8 +- mutt/.mutt/accounts/sanchayan-com | 8 +- mutt/.mutt/accounts/sanchayan-net | 26 +- mutt/.mutt/{gruvbox.muttrc => colours.conf} | 10 +- mutt/.mutt/common.conf | 76 ++++ mutt/.mutt/keybindings.conf | 401 ++++++++++++++++++++ mutt/.mutt/mailboxes.conf | 16 + mutt/.mutt/{mailcap => mailcap.conf} | 0 mutt/.mutt/muttrc | 153 +------- mutt/.mutt/{gpgrc => pgp.conf} | 1 - 13 files changed, 549 insertions(+), 196 deletions(-) create mode 100644 mutt/.mutt/accounts.conf rename mutt/.mutt/{gruvbox.muttrc => colours.conf} (97%) create mode 100644 mutt/.mutt/common.conf create mode 100644 mutt/.mutt/keybindings.conf create mode 100644 mutt/.mutt/mailboxes.conf rename mutt/.mutt/{mailcap => mailcap.conf} (100%) rename mutt/.mutt/{gpgrc => pgp.conf} (99%) diff --git a/mutt/.mutt/accounts.conf b/mutt/.mutt/accounts.conf new file mode 100644 index 0000000..cc29266 --- /dev/null +++ b/mutt/.mutt/accounts.conf @@ -0,0 +1,24 @@ +# vim: set ft=muttrc + +# Load the default account information +source ~/.mutt/accounts/sanchayan-net + +# Create some macros to switch between accounts +macro generic,index,pager 1 'source ~/.mutt/accounts/sanchayan-net=sanchayan-net/Inbox/' +macro generic,index,pager 2 'source ~/.mutt/accounts/sanchayan=sanchayan/Inbox/' +macro generic,index,pager 3 'source ~/.mutt/accounts/asymptotic=asymptotic/Inbox/' +macro generic,index,pager 4 'source ~/.mutt/accounts/fastmail=fastmail/Inbox/' +macro generic,index,pager 5 'source ~/.mutt/accounts/sanchayan-com=sanchayan-com/Inbox/' + +# Default to my normal account +message-hook '~t .*' 'source ~/.mutt/accounts/sanchayan-net' + +# Move emails to the trash folder when deleting, unless you are in the trash folder +folder-hook trash$ unset trash + +# Add some message hooks to automatically select the proper account when replying to an email +message-hook '~t ^me@sanchayanmaity\.net$' 'source ~/.mutt/accounts/sanchayan-net' +message-hook '~t ^me@sanchayanmaity\.com$' 'source ~/.mutt/accounts/sanchayan-com' +message-hook '~t ^sanchayan@asymptotic\.io$' 'source ~/.mutt/accounts/asymptotic' +message-hook '~t ^maitysanchayan@gmail\.com$' 'source ~/.mutt/accounts/sanchayan' +message-hook '~t ^maitysanchayan@fastmail\.com$' 'source ~/.mutt/accounts/fastmail' diff --git a/mutt/.mutt/accounts/asymptotic b/mutt/.mutt/accounts/asymptotic index 01da668..00aac17 100644 --- a/mutt/.mutt/accounts/asymptotic +++ b/mutt/.mutt/accounts/asymptotic @@ -2,13 +2,6 @@ set from = "Sanchayan Maity " set sendmail = "msmtp -a asymptotic" -set mbox = "+asymptotic/Archive" -set postponed = "+asymptotic/Drafts" set record = "+asymptotic/Sent" -set signature = "~/.mutt/signature" - -macro index S +asymptotic/Spam -macro index D +asymptotic/Trash - -macro index gi =asymptotic/Inbox -macro index gs =asymptotic/Sent +set postponed = "+asymptotic/Drafts" +set trash = "+asymptotic/Trash" diff --git a/mutt/.mutt/accounts/fastmail b/mutt/.mutt/accounts/fastmail index b3c3199..ec0c621 100644 --- a/mutt/.mutt/accounts/fastmail +++ b/mutt/.mutt/accounts/fastmail @@ -2,13 +2,6 @@ set from = "Sanchayan Maity " set sendmail = "msmtp -a fastmail" -set mbox = "+fastmail/Archive" -set postponed = "+fastmail/Drafts" set record = "+fastmail/Sent" -set signature = "~/.mutt/signature" - -macro index D +fastmail/Trash -macro index S +fastmail/Spam - -macro index gi "=fastmail/Inbox" "Go to Inbox" -macro index gs "=fastmail/Sent" "Go to Sent" +set postponed = "+fastmail/Drafts" +set trash = "+fastmail/Trash" diff --git a/mutt/.mutt/accounts/sanchayan b/mutt/.mutt/accounts/sanchayan index f2d21d0..b9448bd 100644 --- a/mutt/.mutt/accounts/sanchayan +++ b/mutt/.mutt/accounts/sanchayan @@ -2,10 +2,6 @@ set from = "Sanchayan Maity " set sendmail = "msmtp -a Sanchayan" -set mbox = "+sanchayan/Archive" -set postponed = "+sanchayan/Drafts" set record = "+sanchayan/Sent" -set signature = "~/.mutt/signature" - -macro index S +sanchayan/Spam -macro index D +sanchayan/Trash +set postponed = "+sanchayan/Drafts" +set trash = "+sanchayan/Trash" diff --git a/mutt/.mutt/accounts/sanchayan-com b/mutt/.mutt/accounts/sanchayan-com index fd870f1..1ae8894 100644 --- a/mutt/.mutt/accounts/sanchayan-com +++ b/mutt/.mutt/accounts/sanchayan-com @@ -2,10 +2,6 @@ set from = "Sanchayan Maity " set sendmail = "msmtp -a sanchayan-com" -set mbox = "+sanchayan-com/Archive" -set postponed = "+sanchayan-com/Drafts" set record = "+sanchayan-com/Sent" -set signature = "~/.mutt/signature" - -macro index J +sanchayan-com/Junk -macro index D +sanchayan-com/Trash +set postponed = "+sanchayan-com/Drafts" +set trash = "+sanchayan-com/Trash" diff --git a/mutt/.mutt/accounts/sanchayan-net b/mutt/.mutt/accounts/sanchayan-net index d5fa8ac..4b840bc 100644 --- a/mutt/.mutt/accounts/sanchayan-net +++ b/mutt/.mutt/accounts/sanchayan-net @@ -2,23 +2,19 @@ set from = "Sanchayan Maity " set sendmail = "msmtp -a sanchayan-net" -set mbox = "+sanchayan-net/Archive" -set postponed = "+sanchayan-net/Drafts" set record = "+sanchayan-net/Sent" -set signature = "~/.mutt/signature" +set postponed = "+sanchayan-net/Drafts" +set trash = "+sanchayan-net/Trash" -macro index J +sanchayan-net/Junk -macro index D +sanchayan-net/Trash - -macro index gi =sanchayan-net/Inbox -macro index gf =sanchayan-net/FreedesktopGitlab -macro index gg =sanchayan-net/gstreamer -macro index gs =sanchayan-net/Sent -macro index ge =sanchayan-net/ietf -macro index gc =sanchayan-net/Coffee -macro index gt =sanchayan-net/Trash -macro index gj =sanchayan-net/Junk -macro index gS =sanchayan-net/Spam +macro index gi =sanchayan-net/Inbox +macro index gf =sanchayan-net/FreedesktopGitlab +macro index gg =sanchayan-net/gstreamer +macro index gs =sanchayan-net/Sent +macro index ge =sanchayan-net/ietf +macro index gc =sanchayan-net/Coffee +macro index gt =sanchayan-net/Trash +macro index gj =sanchayan-net/Junk +macro index gS =sanchayan-net/Spam # See send-hook and patterns here http://www.mutt.org/doc/manual/#patterns #send-hook . 'reset crypt_autoencrypt' diff --git a/mutt/.mutt/gruvbox.muttrc b/mutt/.mutt/colours.conf similarity index 97% rename from mutt/.mutt/gruvbox.muttrc rename to mutt/.mutt/colours.conf index 0b958af..d994b82 100644 --- a/mutt/.mutt/gruvbox.muttrc +++ b/mutt/.mutt/colours.conf @@ -1,19 +1,21 @@ -# gruvbox dark (contrast dark): +# vim: set ft=muttrc + +# Gruvbox Dark (contrast dark): # bg0 = 234 # bg1 = 237 # bg2 = 239 # bg3 = 241 # bg4 = 243 -# +# # gray = 245 -# +# # fg0 = 229 # fg1 = 223 # fg2 = 250 # fg3 = 248 # fg4 = 246 -# +# # red = 167 # green = 142 # yellow = 214 diff --git a/mutt/.mutt/common.conf b/mutt/.mutt/common.conf new file mode 100644 index 0000000..9e09d01 --- /dev/null +++ b/mutt/.mutt/common.conf @@ -0,0 +1,76 @@ +# vim: set ft=muttrc + +set realname = "Sanchayan Maity" +set mbox_type = Maildir +set spoolfile = +/sanchayan-net/Inbox +set mailcap_path = ~/.mutt/mailcap.conf +set signature = ~/.mutt/signature + +# Defaults for how to open attachments +auto_view text/html +alternative_order text/plain text/html + +set sort = 'threads' +set sort_aux = 'reverse-last-date-received' +set date_format = "%y-%m-%d %T" +set fast_reply = yes +set index_format = "%2C | %Z [%d] %-30.30F (%-4.4c) %s" +set folder_format = " %N %f" +set forward_format = "Fwd: %s" +set ispell = "/usr/bin/ispell" +set send_charset = "utf-8" +set to_chars = " +TCFL" +set header_cache = ~/Mail/.mutt/cache/headers +set message_cachedir = ~/Mail/.mutt/cache/bodies +set sleep_time = 0 +set mail_check = 0 +set delete = yes +set move = no +set mark_old = no +set confirmappend = no + +set fcc_attach +set include +set forward_quote +set envelope_from +set mail_check_stats +set quit + +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_width = 40 +set sidebar_short_path = no + +#======================================================# +set editor="nvim" +set edit_headers # See the headers when editing + +#======================================================# +# Order of headers and what to show +hdr_order Date: From: User-Agent: X-Mailer \ + To: Cc: Reply-To: Subject: +ignore * +unignore Date: From: User-Agent: X-Mailer: X-PGP-Key: \ + To: Cc: Reply-To: Subject: + +#======================================================# +# Odds and Ends +set markers # mark wrapped lines of text in the pager with a + +set smart_wrap # Don't wrap mid-word +set status_on_top # Status bar on top. +set pager_stop +set menu_scroll +set smart_wrap +set tilde +set sort_alias = alias # sort aliases in alpha order by alias name +set pager_context = 6 # Retain 6 lines of previous page when scrolling. +set pager_index_lines = 8 + +# GPG signing options +set crypt_autosign = "no" +set crypt_replyencrypt = "yes" +set crypt_replysign = "yes" +set crypt_replysignencrypted = "yes" +set crypt_opportunistic_encrypt = "no" +set postpone_encrypt = "no" +set pgp_use_gpg_agent = "yes" +set pgp_default_key = "6F6A0609C12038F3" diff --git a/mutt/.mutt/keybindings.conf b/mutt/.mutt/keybindings.conf new file mode 100644 index 0000000..9ecd8db --- /dev/null +++ b/mutt/.mutt/keybindings.conf @@ -0,0 +1,401 @@ +# vim: set ft=muttrc + +# Macros + +# Unbind everything.. The defaults suck balls and do crazy things +bind generic,pager,editor,index a noop +bind generic,pager,editor,index b noop +bind generic,pager,editor,index c noop +bind generic,pager,editor,index d noop +bind generic,pager,editor,index e noop +bind generic,pager,editor,index f noop +bind generic,pager,editor,index g noop +bind generic,pager,editor,index h noop +bind generic,pager,editor,index i noop +bind generic,pager,editor,index j noop +bind generic,pager,editor,index k noop +bind generic,pager,editor,index l noop +bind generic,pager,editor,index m noop +bind generic,pager,editor,index n noop +bind generic,pager,editor,index o noop +bind generic,pager,editor,index p noop +bind generic,pager,editor,index q noop +bind generic,pager,editor,index r noop +bind generic,pager,editor,index s noop +bind generic,pager,editor,index t noop +bind generic,pager,editor,index u noop +bind generic,pager,editor,index v noop +bind generic,pager,editor,index w noop +bind generic,pager,editor,index x noop +bind generic,pager,editor,index y noop +bind generic,pager,editor,index z noop +bind generic,pager,editor,index A noop +bind generic,pager,editor,index B noop +bind generic,pager,editor,index C noop +bind generic,pager,editor,index D noop +bind generic,pager,editor,index E noop +bind generic,pager,editor,index F noop +bind generic,pager,editor,index G noop +bind generic,pager,editor,index H noop +bind generic,pager,editor,index I noop +bind generic,pager,editor,index J noop +bind generic,pager,editor,index K noop +bind generic,pager,editor,index L noop +bind generic,pager,editor,index M noop +bind generic,pager,editor,index N noop +bind generic,pager,editor,index O noop +bind generic,pager,editor,index P noop +bind generic,pager,editor,index Q noop +bind generic,pager,editor,index R noop +bind generic,pager,editor,index S noop +bind generic,pager,editor,index T noop +bind generic,pager,editor,index U noop +bind generic,pager,editor,index V noop +bind generic,pager,editor,index W noop +bind generic,pager,editor,index X noop +bind generic,pager,editor,index Y noop +bind generic,pager,editor,index Z noop + +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop + +bind generic,pager,editor,index 1 noop +bind generic,pager,editor,index 2 noop +bind generic,pager,editor,index 3 noop +bind generic,pager,editor,index 4 noop +bind generic,pager,editor,index 5 noop +bind generic,pager,editor,index 6 noop +bind generic,pager,editor,index 7 noop +bind generic,pager,editor,index 8 noop +bind generic,pager,editor,index 9 noop +bind generic,pager,editor,index 0 noop +bind generic,pager,editor,index ! noop +bind generic,pager,editor,index @ noop +bind generic,pager,editor,index $ noop +bind generic,pager,editor,index % noop +bind generic,pager,editor,index ^ noop +bind generic,pager,editor,index & noop +bind generic,pager,editor,index * noop +bind generic,pager,editor,index ( noop +bind generic,pager,editor,index ) noop + +bind generic,pager,editor,index \Ca noop +bind generic,pager,editor,index \Cb noop +bind generic,pager,editor,index \Cc noop +bind generic,pager,editor,index \Cd noop +bind generic,pager,editor,index \Ce noop +bind generic,pager,editor,index \Cf noop +bind generic,pager,editor,index \Cg noop +bind generic,pager,editor,index \Ch noop +bind generic,pager,editor,index \Ci noop +bind generic,pager,editor,index \Cj noop +bind generic,pager,editor,index \Ck noop +bind generic,pager,editor,index \Cl noop +bind generic,pager,editor,index \Cm noop +bind generic,pager,editor,index \Cn noop +bind generic,pager,editor,index \Co noop +bind generic,pager,editor,index \Cp noop +bind generic,pager,editor,index \Cq noop +bind generic,pager,editor,index \Cr noop +bind generic,pager,editor,index \Cs noop +bind generic,pager,editor,index \Ct noop +bind generic,pager,editor,index \Cu noop +bind generic,pager,editor,index \Cv noop +bind generic,pager,editor,index \Cw noop +bind generic,pager,editor,index \Cx noop +bind generic,pager,editor,index \Cy noop +bind generic,pager,editor,index \Cz noop +bind generic,pager,editor,index \CA noop +bind generic,pager,editor,index \CB noop +bind generic,pager,editor,index \CC noop +bind generic,pager,editor,index \CD noop +bind generic,pager,editor,index \CE noop +bind generic,pager,editor,index \CF noop +bind generic,pager,editor,index \CG noop +bind generic,pager,editor,index \CH noop +bind generic,pager,editor,index \CI noop +bind generic,pager,editor,index \CJ noop +bind generic,pager,editor,index \CK noop +bind generic,pager,editor,index \CL noop +bind generic,pager,editor,index \CM noop +bind generic,pager,editor,index \CN noop +bind generic,pager,editor,index \CO noop +bind generic,pager,editor,index \CP noop +bind generic,pager,editor,index \CQ noop +bind generic,pager,editor,index \CR noop +bind generic,pager,editor,index \CS noop +bind generic,pager,editor,index \CT noop +bind generic,pager,editor,index \CU noop +bind generic,pager,editor,index \CV noop +bind generic,pager,editor,index \CW noop +bind generic,pager,editor,index \CX noop +bind generic,pager,editor,index \CY noop +bind generic,pager,editor,index \CZ noop + +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop +bind generic,pager,editor,index \C noop + +bind generic,pager,editor,index \C1 noop +bind generic,pager,editor,index \C2 noop +bind generic,pager,editor,index \C3 noop +bind generic,pager,editor,index \C4 noop +bind generic,pager,editor,index \C5 noop +bind generic,pager,editor,index \C6 noop +bind generic,pager,editor,index \C7 noop +bind generic,pager,editor,index \C8 noop +bind generic,pager,editor,index \C9 noop +bind generic,pager,editor,index \C0 noop +bind generic,pager,editor,index \C! noop +bind generic,pager,editor,index \C$ noop +bind generic,pager,editor,index \C% noop +bind generic,pager,editor,index \C^ noop +bind generic,pager,editor,index \C& noop +bind generic,pager,editor,index \C* noop +bind generic,pager,editor,index \C( noop +bind generic,pager,editor,index \C) noop + +bind generic,pager,editor,index a noop +bind generic,pager,editor,index b noop +bind generic,pager,editor,index c noop +bind generic,pager,editor,index d noop +bind generic,pager,editor,index e noop +bind generic,pager,editor,index f noop +bind generic,pager,editor,index g noop +bind generic,pager,editor,index h noop +bind generic,pager,editor,index i noop +bind generic,pager,editor,index j noop +bind generic,pager,editor,index k noop +bind generic,pager,editor,index l noop +bind generic,pager,editor,index m noop +bind generic,pager,editor,index n noop +bind generic,pager,editor,index o noop +bind generic,pager,editor,index p noop +bind generic,pager,editor,index q noop +bind generic,pager,editor,index r noop +bind generic,pager,editor,index s noop +bind generic,pager,editor,index t noop +bind generic,pager,editor,index u noop +bind generic,pager,editor,index v noop +bind generic,pager,editor,index w noop +bind generic,pager,editor,index x noop +bind generic,pager,editor,index y noop +bind generic,pager,editor,index z noop +bind generic,pager,editor,index A noop +bind generic,pager,editor,index B noop +bind generic,pager,editor,index C noop +bind generic,pager,editor,index D noop +bind generic,pager,editor,index E noop +bind generic,pager,editor,index F noop +bind generic,pager,editor,index G noop +bind generic,pager,editor,index H noop +bind generic,pager,editor,index I noop +bind generic,pager,editor,index J noop +bind generic,pager,editor,index K noop +bind generic,pager,editor,index L noop +bind generic,pager,editor,index M noop +bind generic,pager,editor,index N noop +bind generic,pager,editor,index O noop +bind generic,pager,editor,index P noop +bind generic,pager,editor,index Q noop +bind generic,pager,editor,index R noop +bind generic,pager,editor,index S noop +bind generic,pager,editor,index T noop +bind generic,pager,editor,index U noop +bind generic,pager,editor,index V noop +bind generic,pager,editor,index W noop +bind generic,pager,editor,index X noop +bind generic,pager,editor,index Y noop +bind generic,pager,editor,index Z noop + +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop +bind generic,pager,editor,index noop + +bind generic,pager,editor,index 1 noop +bind generic,pager,editor,index 2 noop +bind generic,pager,editor,index 3 noop +bind generic,pager,editor,index 4 noop +bind generic,pager,editor,index 5 noop +bind generic,pager,editor,index 6 noop +bind generic,pager,editor,index 7 noop +bind generic,pager,editor,index 8 noop +bind generic,pager,editor,index 9 noop +bind generic,pager,editor,index 0 noop +bind generic,pager,editor,index ! noop +bind generic,pager,editor,index @ noop +bind generic,pager,editor,index $ noop +bind generic,pager,editor,index % noop +bind generic,pager,editor,index ^ noop +bind generic,pager,editor,index & noop +bind generic,pager,editor,index * noop +bind generic,pager,editor,index ( noop +bind generic,pager,editor,index ) noop + +# Generic can happen anywhere (except pager and editor) +# Browser is the list of mailboxes +# Index = the list of messages +# Pager is when you have an email open + +### General bindings ### + +# Jump to the beginning/end +bind generic,index 0 first-entry +bind generic,index $ last-entry + +# Set 'q' to let us exit from anywhere +bind generic,index,pager,index Q exit +macro generic,index,pager q "QQQ" + +# Default Left/Right to go backwards/fowr +bind generic,index select-entry +bind generic,index select-entry +bind generic,index l select-entry + +# Make up/down do the logical thing +bind generic,index previous-entry +bind generic,index next-entry +bind generic,index k previous-entry +bind generic,index j next-entry +bind generic,index,pager previous-page +bind generic,index,pager next-page + +# Reload configuration +macro generic,index,pager,editor , ":source ~/.mutt/muttrc\n" "Reload mutt's configuration file" + +# Other oddds and ends +bind generic,index,pager / search +bind generic,index,pager : enter-command + +### Browser bindings ### +## Browser is used when viewing the list of mailboxes +bind browser check-new +bind browser N select-new + +### Index bindings ### +## Index is used when viewing the list of emails in a mailbox + +# Changing folders +bind index c change-folder +macro index "c?\t" "Go back to the list of mailboxes" +macro index h "c?\t" "Go back to the list of mailboxes" + +# Setting/clearing flags +bind index W clear-flag +bind index w set-flag +bind index P previous-new-then-unread +bind index N next-new-then-unread +bind index t read-thread +macro index T tn +macro index ! wN "Mark email as unread" +macro index r WNn "Mark as read, then go to next" + +# Reply/forward/etc. +bind index m mail +bind index \Cr reply +bind index r group-reply # Control-r +bind index R list-reply +bind index b bounce-message +bind index f forward-message + +# Odds and ends +bind index display-message +bind index display-message +macro index "c?\t" +macro index h "c?\t" +bind index l display-message +bind index @ display-address +bind index a create-alias +bind index / limit +bind index o sort-mailbox +bind index p print-message +bind index s save-message +bind index | pipe-message +bind index n next-unread + +# Delete +bind index d delete-message +bind index D purge-message +bind index u undelete-message +bind index S sync-mailbox + +### Pager bindings ### +## Pager is used on the 'help' screen, as well as when reading emails +bind pager previous-line +bind pager next-line +bind pager k previous-line +bind pager l next-line + +# Reply/forward/etc. +bind pager m mail +bind pager \Cr reply +bind pager r group-reply # Control-r +bind pager R list-reply +bind pager b bounce-message +bind pager f forward-message + +# Odds and ends +bind pager @ display-address +bind pager a create-alias +bind pager o sort-mailbox +bind pager p print-message +bind pager s save-message +bind pager | pipe-message +bind pager view-attachments +bind pager exit +bind pager l view-attachments +bind pager h exit +bind pager n next-entry +bind pager N next-unread +bind pager h display-toggle-weed + +### Attach is on the attachments list +bind attach exit +bind attach view-text + +bind index,pager B sidebar-toggle-visible +bind index,pager \Cp sidebar-prev +bind index,pager \Cn sidebar-next +bind index,pager \Co sidebar-open + +macro index ,so "l ^a^k^O\n" "Show old messages only" +macro index ,sn "l ^a^k~N\n" "Show unread/new only" +macro index ,sf "l ~F\n" "Show flagged messages only" +macro index ,si "l (~n5-100|~N)\n" "Show higher scoring messages" +macro index ,sa "l ^a^kall\n" "Show all messages" +macro index ,hl "l ^a^k!~l\n" "Hide list messages" +macro index A "all\n" "show all messages (undo limit)" diff --git a/mutt/.mutt/mailboxes.conf b/mutt/.mutt/mailboxes.conf new file mode 100644 index 0000000..321e126 --- /dev/null +++ b/mutt/.mutt/mailboxes.conf @@ -0,0 +1,16 @@ +# vim: set ft=muttrc + +mailboxes = +sanchayan-net/Inbox +mailboxes = +sanchayan-net/Coffee +mailboxes = +sanchayan-net/ietf +mailboxes = +sanchayan-net/gstreamer +mailboxes = +sanchayan-net/FreedesktopGitlab + +mailboxes = +sanchayan-com/Inbox + +mailboxes = +sanchayan/Inbox + +mailboxes = +asymptotic/bluez +mailboxes = +asymptotic/Inbox + +mailboxes = +fastmail/Inbox diff --git a/mutt/.mutt/mailcap b/mutt/.mutt/mailcap.conf similarity index 100% rename from mutt/.mutt/mailcap rename to mutt/.mutt/mailcap.conf diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc index fcebe5c..1f6dc79 100644 --- a/mutt/.mutt/muttrc +++ b/mutt/.mutt/muttrc @@ -1,147 +1,8 @@ -# vim: syntax=muttrc +set folder = ~/Mail -set mbox_type = Maildir -set folder = ~/Mail -set spoolfile = +/sanchayan-net/Inbox -set header_cache=~/Mail/.mutt_cache/ - -source ~/.mutt/gpgrc -source ~/.mutt/accounts/sanchayan-net -source ~/.mutt/accounts/sanchayan-com -source ~/.mutt/accounts/sanchayan -source ~/.mutt/accounts/asymptotic -source ~/.mutt/accounts/fastmail - -folder-hook sanchayan-net/* source ~/.mutt/accounts/sanchayan-net -folder-hook sanchayan-com/* source ~/.mutt/accounts/sanchayan-com -folder-hook sanchayan/* source ~/.mutt/accounts/sanchayan -folder-hook asymptotic/* source ~/.mutt/accounts/asymptotic -folder-hook fastmail/* source ~/.mutt/accounts/fastmail - -set mail_check = 0 -set envelope_from - -unset move # gmail does that -set delete # don't ask, just do -unset confirmappend # don't ask, just do! -set quit # don't ask, just do!! -unset mark_old # read/new is good enough for me - -# sort/threading -set sort = threads -set sort_aux = reverse-last-date-received -set sort_re - -# look and feel -set pager_index_lines = 8 -set pager_context = 5 -set pager_stop -set menu_scroll -set smart_wrap -set tilde -unset markers - -# composing -set fcc_attach -unset mime_forward -set forward_format = "Fwd: %s" -set include -set forward_quote - -ignore * # first, ignore all headers -unignore from: to: cc: date: subject: # then, show only these -hdr_order from: to: cc: date: subject: # and in this order - -source ~/.mutt/gruvbox.muttrc - -set send_charset="us-ascii:utf-8" -set send_charset="utf-8" - -set editor="nvim" - -set date_format="%y-%m-%d %T" -set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s" - -set sleep_time = 0 - -set mailcap_path = ~/.mutt/mailcap -auto_view text/html -alternative_order text/plain text/html - -## Add this sender to Abook -bind editor complete-query - -set edit_headers = yes - -# 'L' performs a notmuch query, showing only the results -macro index L "unset wait_keyread -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"" "show only messages matching a notmuch pattern" - -# 'a' shows all messages again (supersedes default binding) -macro index a "all\n" "show all messages (undo limit)" - -# Binding 'ca' will alias 'c -bind index c noop - -macro index C '?^K=' -macro index cn 'source ~/.mutt/muttrc/accounts/sanchayan-net=sanchayan-net/Inbox/' -macro index cc 'source ~/.mutt/muttrc/accounts/sanchayan-com=sanchayan-com/Inbox/' -macro index cg 'source ~/.mutt/muttrc/accounts/sanchayan=sanchayan/Inbox/' -macro index ca 'source ~/.mutt/muttrc/accounts/asymptotic=asymptotic/Inbox/' -macro index cf 'source ~/.mutt/muttrc/accounts/fastmail=fastmail/Inbox/' - -macro index ,so "l ^a^k^O\n" "show old messages only" -macro index ,sn "l ^a^k~N\n" "show unread/new only" -macro index ,sf "l ~F\n" "show flagged messages only" -macro index ,si "l (~n5-100|~N)\n" "show higher scoring messages" -macro index ,hl "l ^a^k!~l\n" "hide list messages" -macro index ,sa "l ^a^kall\n" "show all messages" - -bind pager previous-line -bind pager next-line - -set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" -set mail_check_stats -set sidebar_width = 40 -set sidebar_short_path = no - -bind index,pager B sidebar-toggle-visible -bind index,pager \Cp sidebar-prev -bind index,pager \Cn sidebar-next -bind index,pager \Co sidebar-open - -mailboxes = +sanchayan-net/Inbox -mailboxes = +sanchayan-net/Coffee -mailboxes = +sanchayan-net/ietf -mailboxes = +sanchayan-net/gstreamer -mailboxes = +sanchayan-net/FreedesktopGitlab -mailboxes = +sanchayan-net/Sent -mailboxes = +sanchayan-net/Spam -mailboxes = +sanchayan-net/Trash - -mailboxes = +sanchayan-com/Inbox -mailboxes = +sanchayan-com/Sent -mailboxes = +sanchayan-com/Spam -mailboxes = +sanchayan-com/Trash - -mailboxes = +sanchayan/Inbox -mailboxes = +sanchayan/Sent -mailboxes = +sanchayan/Spam - -mailboxes = +asymptotic/bluez -mailboxes = +asymptotic/Inbox -mailboxes = +asymptotic/Sent -mailboxes = +asymptotic/Trash - -mailboxes = +fastmail/Inbox -mailboxes = +fastmail/Sent -mailboxes = +fastmail/Spam - -# GPG signing options -set crypt_autosign = "no" -set crypt_replyencrypt = "yes" -set crypt_replysign = "yes" -set crypt_replysignencrypted = "yes" -set crypt_opportunistic_encrypt = "no" -set postpone_encrypt = "no" -set pgp_use_gpg_agent = "yes" -set pgp_default_key = "6F6A0609C12038F3" +source ~/.mutt/keybindings.conf +source ~/.mutt/mailboxes.conf +source ~/.mutt/common.conf +source ~/.mutt/colours.conf +source ~/.mutt/pgp.conf +source ~/.mutt/accounts.conf diff --git a/mutt/.mutt/gpgrc b/mutt/.mutt/pgp.conf similarity index 99% rename from mutt/.mutt/gpgrc rename to mutt/.mutt/pgp.conf index 62f36be..3f3dccf 100644 --- a/mutt/.mutt/gpgrc +++ b/mutt/.mutt/pgp.conf @@ -113,4 +113,3 @@ set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" # This is now deprecated by pgp_check_gpg_decrypt_status_fd: # set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" set pgp_check_gpg_decrypt_status_fd -