diff options
Diffstat (limited to 'mutt/muttrc')
-rw-r--r-- | mutt/muttrc | 268 |
1 files changed, 135 insertions, 133 deletions
diff --git a/mutt/muttrc b/mutt/muttrc index a16a0088..517773d9 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -1,131 +1,120 @@ -# Addresses -set query_command = 'abook --mutt-query %s' -set reverse_name = yes -set use_domain = yes -set use_from = yes - -# Alerts -set beep_new = yes - -# Attachments -attachments +A */.* -attachments -A text/x-vcard application/pgp.* -attachments -A application/x-pkcs7-.* -attachments +I text/plain -attachments -A message/external-body -attachments -I message/external-body - -# Caching +# Prefer the plain text part of multipart emails, followed by the HTML part, +# followed by any other parts. Decode the text/html part with .mailcap's +# chosen program (I favour Lynx). +# +alternative_order text/plain text/html * +auto_view text/html + +# If an outgoing message looks like I meant to attach something, and there +# isn't an attachment, prompt me to make sure I haven't forgotten it. +# I normally don't like this sort of nagging, but I'm making an exception in +# this case, as I really do trip up on this a lot. The default pattern of just +# 'attach' is a bit too aggressive, so I write a slightly softer one. +# +set abort_noattach = ask-no +set abort_noattach_regexp = "attached is|find attached|i've attached" + +# Don't send terminal bells on errors, but do send them when new mail arrives, +# because that should light up my tmux window label and/or urxvt window. +# +unset beep +set beep_new + +# Don't prompt me for confirmation if I move messages into an existing mailbox; +# just do it. +# +unset confirmappend + +# Use the GPGME library for PGP. Sign replies to messages that are themselves +# signed or encrypted. +# +set crypt_use_gpgme +set crypt_replysign +set crypt_replysignencrypted + +# Default to a subject format for forwarded messages that's more familiar to +# most mail users, unless sending mail to a list where they're more likely to +# appreciate the nicer default that uses square brackets and the author email +# address. +# +send-hook ~A \ + 'set forward_format = "Fw: %s"' +send-hook ~l \ + 'reset forward_format' + +# Cache message headers for speed; this really helps. +# set header_cache = '~/.cache/mutt/headers' -# Colors -color attachment brightyellow default -color hdrdefault cyan default -color indicator black white -color markers brightred default -color normal default default -color quoted green default -color signature cyan default -color status default color22 -color tilde brightblack default -color tree default default - -# Completion -bind editor <Tab> complete-query -bind editor ^T complete - -# Files -set delete = ask-yes -set move = no - -# Flags -set mark_old = no - -# Headers -ignore * -unignore Date: From: To: Cc: Bcc: Subject: -hdr_order Date: From: To: Cc: Bcc: Subject: -set edit_headers = yes - -# Index +# I don't really need the major functions' key mappings displayed to me all the +# time; I'll look them up in <help> when I do need them. This buys me another +# row of screen space. +# +unset help + +# Save command history; this saves other kinds of history as well, but all +# I really want is to be able to run the same commands again even after I quit +# Mutt. We can afford to keep 2^8 of these, since it's the future and all. +# +set history = 256 +set history_file = ~/.cache/mutt/history +set save_history = $history + +# Always put a quoted copy of the whole message in a reply text for me to chop +# up and respond to in Vim--no need to prompt me (the default does that). +# +set include + +# Tweak the index format to include spam tagging information, if any, with the +# %H format string +# set index_format = '%4C %Z %{%b %d %Y} %-15.15L (%?l?%4l&%4c?) %?H?[%H] ?%s' -# Interaction -set abort_unmodified = no -set confirmappend = no -set wait_key = no -set quit = ask-yes +# Don't show any nasty little markers at the start of wrapped lines. That's +# the sort of thing Vim cares about, if need be. +# +unset markers -# Intervals -set mail_check = 5 -set sleep_time = 0 - -# Mailboxes -set confirmcreate = yes +# Don't move on to the next message if we're at the end of the current one just +# because I executed <next-page>. +# +set pager_stop -# Menus -set menu_context = 1 - -# MIME -mime_lookup application/octet-stream +# Use the abook program for finding and completing addresses with ^T. I do use +# the aliases system for regular correspondents, too. +# +set query_command = 'abook --mutt-query %s' -# Pager -set pager_context = 1 -set pager_format = '%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)' -set pager_stop = yes +# Don't delay on switching or altering mailboxes so that I see the messages; +# just do it straight away. +# +set sleep_time = 0 -# Presentation/formatting -set markers = no -set smart_wrap = yes -set text_flowed = yes -set tilde = yes -alternative_order text/plain text/html * -auto_view text/html +# Only use the headers with proper references to link messages in a thread; +# don't try to use pattern matches on subjects, which might be rubbish like +# "hi". If I need to link a thread together because it's been broken somehow, +# I'll do that manually. +# +set strict_threads + +# Use format=flowed, continuing paragraphs for lines that end with a single +# space, and use that wrapping information to use the full width of the +# terminal for the wrapping display. +# +set text_flowed +set reflow_wrap = 0 + +# Don't wait for me to press a key after running a command if it exited +# successfully; this still warns me if something failed, though. +# +unset wait_key + +# Save message to whatever box Mutt guesses, without confirmation +macro index,pager S \ + '<save-message><enter>' \ + 'Move message to default mailbox without confirmation' -# Quoting -set quote_regexp = '^(>[ \t]*)+' - -# Responses -set fast_reply = yes -set forward_attachments = yes -set forward_format = 'Fw: %s' -set include = yes -set use_envelope_from = yes - -# Searching/sorting -set sort = 'threads' -set sort_aux = 'last-date-received' -set strict_threads = yes -set thorough_search = yes - -# SSH -set time_inc = 250 - -# Encryption settings -set crypt_replysign = yes -set crypt_replyencrypt = yes -set crypt_replysignencrypted = yes -set crypt_use_gpgme = yes -set crypt_use_pka = yes -set crypt_verify_sig = yes - -# Do decode classic PGP messages, though we'll never write them -set pgp_auto_decode = yes - -# Vim-ish bindings -bind index gg first-entry -bind index G last-entry -bind pager gg top -bind pager G bottom -bind index,pager \Cu half-up -bind index,pager \Cd half-down -bind generic,index,browser,pager \Cf next-page -bind generic,index,browser,pager \Cb previous-page - -# Turn off annoying mailbox lock feature -bind index '%' noop - -# Shortcuts to jump to mailboxes; the format here is byzantine, but it copes correctly with changes to the variables +# Shortcuts to jump to mailboxes macro generic,index,browser,pager gi \ '<change-folder>!<enter>' \ 'Change to inbox' @@ -135,21 +124,9 @@ macro generic,index,browser,pager gs \ macro generic,index,browser,pager gb \ '<change-folder>-<enter>' \ 'Change to previous' -# The format here is pretty weird, but it copes correctly with changes to the -# variable that occur *after* the macro is defined, and there isn't -# a punctuation shortcut for it like there is for the previous three. I'd love -# to know if there's a better way to do this that I've missed in the manual. -macro generic,index,browser,pager gd '\ -<enter-command>push "<change-folder>$postponed"<enter><enter>' \ - 'Change to drafts' - -# Blindly save message to whatever box is suggested -macro index,pager S \ - '<save-message><enter>' \ - 'Save message blindly' # Shortcut to add addresses to abook -macro index,pager A \ +macro index,pager \\A \ '<pipe-message>abook --add-email-quiet<enter>' \ 'Add sender address to abook' @@ -160,5 +137,30 @@ macro generic,index,browser,pager \\R '\ <enter-command>echo "Reloaded with $alias_file"<enter>' \ "Clear hooks and reload" -# Machine or account specific settings +# Shortcut to toggle thread display +set my_sort_alt = threads +macro index \\t '\ +<enter-command>set my_sort_cur = $sort<enter>\ +<enter-command>set sort = $my_sort_alt<enter>\ +<enter-command>set my_sort_alt = $my_sort_cur<enter>' \ + "Toggle thread display" + +# Set a few simple colors just for a quick visual cue of which tool I'm looking +# at and for some visual distinction between text, signature, and quote. The +# navigation bar is a nice dark green. +# +color attachment \ + brightyellow default +color hdrdefault \ + brightcyan default +color quoted \ + brightgreen default +color signature \ + cyan default +color status \ + default color22 + +# Load machine-specific or account-specific settings from the helper script in +# muttrc.d, and w're done. +# source ~/.config/mutt/muttrc.d/src| |