From 971efeec3bf05310e3cf404b645143153e07305b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 17 May 2020 22:38:37 +1200 Subject: Remove erroneous comment --- mutt/muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/muttrc b/mutt/muttrc index a16a0088..eb987699 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -125,7 +125,7 @@ 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 to inbox' -- cgit v1.2.3 From 9271f8bdf1ed7fbc30fe4ba463b8d7950ebe7884 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 17 May 2020 22:42:28 +1200 Subject: Swap j/k and J/K in Mutt The former's default bindings don't allow selecting deleted messages, which seems less intuitive to me. --- mutt/muttrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mutt/muttrc b/mutt/muttrc index eb987699..032de0cf 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -125,6 +125,12 @@ bind generic,index,browser,pager \Cb previous-page # Turn off annoying mailbox lock feature bind index '%' noop +# Swap j/k (next/prev undeleted) with J/K (next/prev item) +bind index j next-entry +bind index k previous-entry +bind index J next-undeleted +bind index K previous-undeleted + # Shortcuts to jump to mailboxes macro generic,index,browser,pager gi \ '!' \ -- cgit v1.2.3 From 07a0ec768b866b2ccb1ac422715345494a0e438a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 00:47:54 +1200 Subject: Use :set/:unset commands in Mutt more tersely --- mutt/muttrc | 58 +++++++++++++++++++++++++++---------------------------- mutt/muttrc.d/src | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 032de0cf..fc04886f 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -1,11 +1,11 @@ # Addresses set query_command = 'abook --mutt-query %s' -set reverse_name = yes -set use_domain = yes -set use_from = yes +set reverse_name +set use_domain +set use_from # Alerts -set beep_new = yes +set beep_new # Attachments attachments +A */.* @@ -36,24 +36,24 @@ bind editor ^T complete # Files set delete = ask-yes -set move = no +unset move # Flags -set mark_old = no +unset mark_old # Headers ignore * unignore Date: From: To: Cc: Bcc: Subject: hdr_order Date: From: To: Cc: Bcc: Subject: -set edit_headers = yes +set edit_headers # Index 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 +unset abort_unmodified +unset confirmappend +unset wait_key set quit = ask-yes # Intervals @@ -61,7 +61,7 @@ set mail_check = 5 set sleep_time = 0 # Mailboxes -set confirmcreate = yes +set confirmcreate # Menus set menu_context = 1 @@ -72,13 +72,13 @@ mime_lookup application/octet-stream # Pager set pager_context = 1 set pager_format = '%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)' -set pager_stop = yes +set pager_stop # Presentation/formatting -set markers = no -set smart_wrap = yes -set text_flowed = yes -set tilde = yes +unset markers +set smart_wrap +set text_flowed +set tilde alternative_order text/plain text/html * auto_view text/html @@ -86,31 +86,31 @@ auto_view text/html set quote_regexp = '^(>[ \t]*)+' # Responses -set fast_reply = yes -set forward_attachments = yes +set fast_reply +set forward_attachments set forward_format = 'Fw: %s' -set include = yes -set use_envelope_from = yes +set include +set use_envelope_from # Searching/sorting set sort = 'threads' set sort_aux = 'last-date-received' -set strict_threads = yes -set thorough_search = yes +set strict_threads +set thorough_search # 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 +set crypt_replysign +set crypt_replyencrypt +set crypt_replysignencrypted +set crypt_use_gpgme +set crypt_use_pka +set crypt_verify_sig # Do decode classic PGP messages, though we'll never write them -set pgp_auto_decode = yes +set pgp_auto_decode # Vim-ish bindings bind index gg first-entry diff --git a/mutt/muttrc.d/src b/mutt/muttrc.d/src index f03ad462..47cb2df1 100755 --- a/mutt/muttrc.d/src +++ b/mutt/muttrc.d/src @@ -22,5 +22,5 @@ done # because at the moment I haven't worked out how to make this work sanely with # messages-are-flowing in message-mode. case $VISUAL in - emacs|emacsclient) printf 'set edit_headers = no\n' ;; + emacs|emacsclient) printf 'unset edit_headers\n' ;; esac -- cgit v1.2.3 From fddbbf252c622c63675b78b23965a6dfce6689d2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 03:42:04 +1200 Subject: Completely rewrite muttrc --- mutt/muttrc | 256 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 126 insertions(+), 130 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index fc04886f..517773d9 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -1,135 +1,118 @@ -# Addresses -set query_command = 'abook --mutt-query %s' -set reverse_name -set use_domain -set use_from +# 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 -# Alerts +# 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 -# 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 -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 complete-query -bind editor ^T complete - -# Files -set delete = ask-yes -unset move - -# Flags -unset mark_old - -# Headers -ignore * -unignore Date: From: To: Cc: Bcc: Subject: -hdr_order Date: From: To: Cc: Bcc: Subject: -set edit_headers - -# Index -set index_format = '%4C %Z %{%b %d %Y} %-15.15L (%?l?%4l&%4c?) %?H?[%H] ?%s' - -# Interaction -unset abort_unmodified +# Don't prompt me for confirmation if I move messages into an existing mailbox; +# just do it. +# unset confirmappend -unset wait_key -set quit = ask-yes -# Intervals -set mail_check = 5 -set sleep_time = 0 - -# Mailboxes -set confirmcreate +# 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 -# Menus -set menu_context = 1 +# 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' -# MIME -mime_lookup application/octet-stream +# I don't really need the major functions' key mappings displayed to me all the +# time; I'll look them up in 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 -# Pager -set pager_context = 1 -set pager_format = '%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)' -set pager_stop +# 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' -# Presentation/formatting +# 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 -set smart_wrap -set text_flowed -set tilde -alternative_order text/plain text/html * -auto_view text/html -# Quoting -set quote_regexp = '^(>[ \t]*)+' +# Don't move on to the next message if we're at the end of the current one just +# because I executed . +# +set pager_stop -# Responses -set fast_reply -set forward_attachments -set forward_format = 'Fw: %s' -set include -set use_envelope_from +# 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' + +# Don't delay on switching or altering mailboxes so that I see the messages; +# just do it straight away. +# +set sleep_time = 0 -# Searching/sorting -set sort = 'threads' -set sort_aux = 'last-date-received' +# 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 -set thorough_search -# SSH -set time_inc = 250 +# 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 -# Encryption settings -set crypt_replysign -set crypt_replyencrypt -set crypt_replysignencrypted -set crypt_use_gpgme -set crypt_use_pka -set crypt_verify_sig - -# Do decode classic PGP messages, though we'll never write them -set pgp_auto_decode - -# 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 - -# Swap j/k (next/prev undeleted) with J/K (next/prev item) -bind index j next-entry -bind index k previous-entry -bind index J next-undeleted -bind index K previous-undeleted +# Save message to whatever box Mutt guesses, without confirmation +macro index,pager S \ + '' \ + 'Move message to default mailbox without confirmation' # Shortcuts to jump to mailboxes macro generic,index,browser,pager gi \ @@ -141,21 +124,9 @@ macro generic,index,browser,pager gs \ macro generic,index,browser,pager gb \ '-' \ '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 '\ -push "$postponed"' \ - 'Change to drafts' - -# Blindly save message to whatever box is suggested -macro index,pager S \ - '' \ - 'Save message blindly' # Shortcut to add addresses to abook -macro index,pager A \ +macro index,pager \\A \ 'abook --add-email-quiet' \ 'Add sender address to abook' @@ -166,5 +137,30 @@ macro generic,index,browser,pager \\R '\ echo "Reloaded with $alias_file"' \ "Clear hooks and reload" -# Machine or account specific settings +# Shortcut to toggle thread display +set my_sort_alt = threads +macro index \\t '\ +set my_sort_cur = $sort\ +set sort = $my_sort_alt\ +set my_sort_alt = $my_sort_cur' \ + "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| -- cgit v1.2.3 From 424ad45233fc53df44bb766987acc2316c62e9e5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 03:44:35 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9bc6340a..f07251d5 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v8.41.0 -Sun, 17 May 2020 09:50:13 +0000 +tejr dotfiles v9.0.0 +Sun, 17 May 2020 15:44:35 +0000 -- cgit v1.2.3