aboutsummaryrefslogtreecommitdiff
path: root/mutt/muttrc
diff options
context:
space:
mode:
Diffstat (limited to 'mutt/muttrc')
-rw-r--r--mutt/muttrc116
1 files changed, 69 insertions, 47 deletions
diff --git a/mutt/muttrc b/mutt/muttrc
index bd244f8a..da13f3f8 100644
--- a/mutt/muttrc
+++ b/mutt/muttrc
@@ -26,51 +26,6 @@ set beep_new
#
unset confirmappend
-# Use the GPGME library for PGP; sign replies to messages that are themselves
-# signed (whether encrypted or not), and encrypt when we have a key for every
-# recipient (opportunistic).
-#
-set crypt_use_gpgme
-set crypt_opportunistic_encrypt
-set crypt_replysign
-set crypt_replysignencrypted
-
-# Use a default key for self-encrypting both sent and draft messages so that
-# they're protected but legible. This defaults to the GPG_KEYID environment
-# variable, so be careful to set that lest you send useless OpenPGP headers!
-# My kingdom for muttrc(5) conditionals...
-#
-set pgp_default_key = $GPG_KEYID
-set pgp_self_encrypt
-set postpone_encrypt
-
-# Always include OpenPGP header with the selected default key, regardless of
-# whether the message is protected or not:
-#
-# <https://datatracker.ietf.org/doc/draft-josefsson-openpgp-mailnews-header/>
-#
-# This RFC has expired and doesn't seem to have seen widespread adoption, but
-# it seems that Thunderbird's Enigmail extension is still sending key IDs with
-# it, and it doesn't do any harm.
-#
-my_hdr OpenPGP: id=$pgp_default_key\; \
-preference=signencrypt\; \
-url=https://keyserver.pgp.com/vkd/DownloadKey.event?keyid=0x$pgp_default_key
-
-# Because I (personally) never want to encrypt mail without signing it, add in
-# a hook for sending or changing a message that forces a signature if it's
-# encrypted but not signed. This may not suit anyone else reading.
-#
-send-hook '~G !~g' 'push <pgp-menu>s'
-send2-hook '~G !~g' 'push <pgp-menu>s'
-
-# Because of the order in which opportunistic encryption is applied, we queue
-# up a no-op change by opening the PGP menu and then doing nothing (pressing
-# Enter), to trigger send2-hooks to run and turn signatures on if opportunistic
-# encryption happens to have decided to switch encryption on.
-#
-send-hook '!~G !~g' 'push <pgp-menu><enter>'
-
# 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
@@ -83,14 +38,16 @@ send-hook ~l \
# Cache message headers for speed; this really helps.
#
-set header_cache = '~/.cache/mutt/headers'
+set header_cache \
+ = ~/.cache/mutt/headers
# 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_file = \
+ ~/.cache/mutt/history
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
@@ -153,6 +110,71 @@ set reflow_wrap = 0
#
unset wait_key
+# Use the GPGME library for PGP; sign replies to messages that are themselves
+# signed (whether encrypted or not), and encrypt when we have a key for every
+# recipient (opportunistic).
+#
+set crypt_use_gpgme
+set crypt_opportunistic_encrypt
+set crypt_replysign
+set crypt_replysignencrypted
+
+# Use a default key for self-encrypting both sent and draft messages so that
+# they're protected but legible. This defaults to the GPG_KEYID environment
+# variable, so be careful to set that lest you send useless OpenPGP headers!
+# My kingdom for muttrc(5) conditionals...
+#
+set pgp_default_key = $GPG_KEYID
+set pgp_self_encrypt
+set postpone_encrypt
+
+# Always include OpenPGP header with the selected default key, regardless of
+# whether the message is protected or not:
+#
+# <https://datatracker.ietf.org/doc/draft-josefsson-openpgp-mailnews-header/>
+#
+# This RFC has expired and doesn't seem to have seen widespread adoption, but
+# it looks like Thunderbird's Enigmail extension is still sending key IDs with
+# it, and it doesn't do any harm.
+#
+my_hdr OpenPGP: id=$pgp_default_key\; \
+preference=signencrypt\; \
+url=https://keyserver.pgp.com/vkd/DownloadKey.event?keyid=0x$pgp_default_key
+unignore OpenPGP:
+
+# Because I (personally) never want to encrypt mail without signing it, add in
+# a hook for sending or changing a message that forces a signature if it's
+# encrypted but not signed. This may not suit anyone else reading.
+#
+send-hook '~G !~g' 'push <pgp-menu>s'
+send2-hook '~G !~g' 'push <pgp-menu>s'
+
+# Because of the order in which opportunistic encryption is applied, we queue
+# up a no-op change by opening the PGP menu and then doing nothing (pressing
+# Enter), to trigger send2-hooks to run and turn signatures on if opportunistic
+# encryption happens to have decided to switch encryption on.
+#
+send-hook '!~G !~g' 'push <pgp-menu><enter>'
+
+# Failing all of the above, maybe autocrypt will passively give us a key to
+# use, but don't store its keys in our primary keyring.
+#
+set autocrypt
+set autocrypt_dir \
+ = ~/.local/share/mutt/autocrypt
+
+# Set custom filter to generate an HTML part for plain-text messages in
+# Markdown style; defaults to off, per God's will and common decency
+#
+set send_multipart_alternative_filter \
+ = ~/.local/libexec/mutt/filters/markdown-to-html
+
+# Toggle multipart sending option manually and display the new setting
+macro generic,index,browser,pager \\h '\
+<enter-command>toggle send_multipart_alternative<enter>\
+<enter-command>set ?send_multipart_alternative<enter>' \
+ 'Toggle multipart/alternative sending'
+
# Save message to whatever box Mutt guesses, without confirmation
macro index,pager S \
'<save-message><enter>' \