From f00ca705a74d57a2b6d2c47bce469050ba1c9849 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 22:27:06 +1200 Subject: Depend on GnuPG for Mutt --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 724473aa..248f7ac8 100644 --- a/Makefile +++ b/Makefile @@ -493,7 +493,7 @@ install-mpv: mkdir -p -- $(XDG_CONFIG_HOME)/mpv cp -p -- mpv/* $(XDG_CONFIG_HOME)/mpv -install-mutt: install-mail +install-mutt: install-gnupg install-mail mkdir -p -- $(XDG_CONFIG_HOME)/mutt \ $(XDG_CONFIG_HOME)/mutt/muttrc.d \ $(XDG_CACHE_HOME)/mutt -- cgit v1.2.3 From c403fb50c2fbadf16708af3aba19824ad59b5781 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 22:27:31 +1200 Subject: Move PGP config down a bit --- mutt/muttrc | 90 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index bd244f8a..b18d1a94 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: -# -# -# -# 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 s' -send2-hook '~G !~g' 'push 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 ' - # 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 @@ -153,6 +108,51 @@ 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: +# +# +# +# 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 s' +send2-hook '~G !~g' 'push 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 ' + # Save message to whatever box Mutt guesses, without confirmation macro index,pager S \ '' \ -- cgit v1.2.3 From a599da90b3195bc424fb0fb730324ae472032a2c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 22:50:02 +1200 Subject: Use consistent quoting for paths in muttrc --- mutt/muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/muttrc b/mutt/muttrc index b18d1a94..846acfbe 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -38,7 +38,7 @@ 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 -- cgit v1.2.3 From 8761754e17355135aa42316eff9d04e01ec6d598 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 22:50:21 +1200 Subject: Work around a double-up word in a comment --- mutt/muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/muttrc b/mutt/muttrc index 846acfbe..74afc4db 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -132,7 +132,7 @@ set postpone_encrypt # # # 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 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\; \ -- cgit v1.2.3 From c045ec549757ff125addb80e9225c71ddfa8a25b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 22:50:48 +1200 Subject: Add autocrypt settings to main muttrc --- Makefile | 3 ++- mutt/muttrc | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 248f7ac8..fb861593 100644 --- a/Makefile +++ b/Makefile @@ -496,7 +496,8 @@ install-mpv: install-mutt: install-gnupg install-mail mkdir -p -- $(XDG_CONFIG_HOME)/mutt \ $(XDG_CONFIG_HOME)/mutt/muttrc.d \ - $(XDG_CACHE_HOME)/mutt + $(XDG_CACHE_HOME)/mutt \ + $(XDG_DATA_HOME)/mutt/autocrypt cp -p -- mutt/muttrc $(XDG_CONFIG_HOME)/mutt cp -p -- mutt/muttrc.d/src $(XDG_CONFIG_HOME)/mutt/muttrc.d diff --git a/mutt/muttrc b/mutt/muttrc index 74afc4db..56224102 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -153,6 +153,12 @@ send2-hook '~G !~g' 'push s' # send-hook '!~G !~g' 'push ' +# 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 + # Save message to whatever box Mutt guesses, without confirmation macro index,pager S \ '' \ -- cgit v1.2.3 From 460430b4a621fe539301fed1f62d86ef6c15c519 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 19 May 2020 23:39:25 +1200 Subject: Don't configure GnuPG itself anymore Causes more problems than it solves now. Just need to consistently use new versions. --- Makefile | 2 -- gnupg/gpg.conf | 14 -------------- 2 files changed, 16 deletions(-) delete mode 100644 gnupg/gpg.conf diff --git a/Makefile b/Makefile index fb861593..3cf44ee3 100644 --- a/Makefile +++ b/Makefile @@ -455,8 +455,6 @@ install-git: git/config $(GIT_TEMPLATE_HOOKS) install-gnupg: gnupg/profile.d/gnupg.sh install-sh cp -p -- gnupg/profile.d/* $(HOME)/.profile.d - mkdir -m 0700 -p -- $(HOME)/.gnupg - cp -p -- gnupg/*.conf $(HOME)/.gnupg install-gtk: mkdir -p -- $(XDG_CONFIG_HOME)/gtk-3.0 diff --git a/gnupg/gpg.conf b/gnupg/gpg.conf deleted file mode 100644 index 97c1ca77..00000000 --- a/gnupg/gpg.conf +++ /dev/null @@ -1,14 +0,0 @@ -# Assume I mean to encrypt to myself if no recipient is specified -default-recipient-self - -# Don't use key IDs in listings, just show full fingerprints -keyid-format none - -# Suppress the copyright message -no-greeting - -# Don't sign pictures or other binary UID data -only-sign-text-ids - -# Show fingerprints where they might not otherwise appear -with-fingerprint -- cgit v1.2.3 From ea055b0850ca7a1e5be172cfab1c2d334580b1ad Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:24:25 +1200 Subject: Show OpenPGP headers They're short enough, and it's interesting to see them when they do pop up. Autocrypt headers tend to be a bit too long, though. --- mutt/muttrc | 1 + 1 file changed, 1 insertion(+) diff --git a/mutt/muttrc b/mutt/muttrc index 56224102..bf4de5af 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -138,6 +138,7 @@ set postpone_encrypt 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 -- cgit v1.2.3 From 1dae970cc3b4f769523ae8ebfb1cbe52d9583520 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:54:57 +1200 Subject: Fix some spacing in Makefile --- .gitignore | 1 + Makefile | 23 +++++++++++++---------- mutt/filters/markdown-to-html.sh | 7 +++++++ mutt/muttrc | 12 ++++++++++++ 4 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 mutt/filters/markdown-to-html.sh diff --git a/.gitignore b/.gitignore index 6d38b02a..8d022b56 100644 --- a/.gitignore +++ b/.gitignore @@ -185,4 +185,5 @@ /gnupg/profile.d/gnupg.sh.m4 /include/mktd.m4 /less/less +/mutt/filters/markdown-to-html /urxvt/ext/select diff --git a/Makefile b/Makefile index 3cf44ee3..fc35384b 100644 --- a/Makefile +++ b/Makefile @@ -279,8 +279,8 @@ GAMES = games/aaf \ games/zs GIT_TEMPLATE_HOOKS = git/template/hooks/post-update \ - git/template/hooks/pre-commit \ - git/template/hooks/prepare-commit-msg + git/template/hooks/pre-commit \ + git/template/hooks/prepare-commit-msg all: $(BINS) \ $(GIT_TEMPLATE_HOOKS) \ @@ -302,6 +302,7 @@ clean distclean: gnupg/profile.d/gnupg.sh \ include/mktd.m4 \ less/less \ + mutt/filters/markdown-to-html \ urxvt/ext/select \ vim/dist/* @@ -491,13 +492,15 @@ install-mpv: mkdir -p -- $(XDG_CONFIG_HOME)/mpv cp -p -- mpv/* $(XDG_CONFIG_HOME)/mpv -install-mutt: install-gnupg install-mail +install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html mkdir -p -- $(XDG_CONFIG_HOME)/mutt \ $(XDG_CONFIG_HOME)/mutt/muttrc.d \ $(XDG_CACHE_HOME)/mutt \ $(XDG_DATA_HOME)/mutt/autocrypt cp -p -- mutt/muttrc $(XDG_CONFIG_HOME)/mutt cp -p -- mutt/muttrc.d/src $(XDG_CONFIG_HOME)/mutt/muttrc.d + cp -p -- mutt/filters/markdown-to-html \ + $(HOME)/.local/share/mutt/libexec/filters install-ncmcpp: install-mpd mkdir -p -- $(HOME)/.ncmpcpp @@ -507,7 +510,7 @@ install-newsboat: install-systemd mkdir -p -- $(XDG_CONFIG_HOME)/newsboat $(XDG_DATA_HOME)/newsboat cp -p -- newsboat/config $(XDG_CONFIG_HOME)/newsboat -command -v systemctl >/dev/null 2>&1 \ - && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \ + && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \ && cp -p -- newsboat/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user \ && systemctl --user daemon-reload \ && systemctl --user start reload-newsboat.timer \ @@ -563,7 +566,7 @@ install-subversion: install-systemd: -command -v systemctl >/dev/null 2>&1 \ - && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \ + && mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \ && cp -p -- systemd/user/* $(XDG_CONFIG_HOME)/systemd/user \ && systemctl --user daemon-reload \ @@ -623,11 +626,11 @@ install-vim-after-syntax: install-vim-autoload: mkdir -p -- $(VIMDIR)/autoload cd vim && find autoload \ - -type d -exec sh -c \ - 'mkdir -p -- $(VIMDIR)/"$$1"' _ {} \; \ - -o \ - -type f -exec sh -c \ - 'cp -p -- "$$1" $(VIMDIR)/"$$1"' _ {} \; + -type d -exec sh -c \ + 'mkdir -p -- $(VIMDIR)/"$$1"' _ {} \; \ + -o \ + -type f -exec sh -c \ + 'cp -p -- "$$1" $(VIMDIR)/"$$1"' _ {} \; install-vim-bundle: install-vim-config cd vim/bundle && find */* \ diff --git a/mutt/filters/markdown-to-html.sh b/mutt/filters/markdown-to-html.sh new file mode 100644 index 00000000..cdba8ace --- /dev/null +++ b/mutt/filters/markdown-to-html.sh @@ -0,0 +1,7 @@ +printf 'text/html\n\n' +sed 's/ $/ /;/[^ ]$/s/$/ /;s/^-- $/-- /' | +pandoc \ + --from markdown_strict+smart \ + --metadata=pagetitle:HTML \ + --standalone \ + --to html4 diff --git a/mutt/muttrc b/mutt/muttrc index bf4de5af..161385db 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -160,6 +160,18 @@ send-hook '!~G !~g' 'push ' 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 '\ +toggle send_multipart_alternative\ +set ?send_multipart_alternative' \ + 'Toggle multipart/alternative sending' + # Save message to whatever box Mutt guesses, without confirmation macro index,pager S \ '' \ -- cgit v1.2.3 From bc542bf24247f244b8cef5efff8e424ce8b83179 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:55:06 +1200 Subject: Break up some long lines in install-mutt target --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fc35384b..05c5ff29 100644 --- a/Makefile +++ b/Makefile @@ -493,12 +493,16 @@ install-mpv: cp -p -- mpv/* $(XDG_CONFIG_HOME)/mpv install-mutt: install-gnupg install-mail mutt/filters/markdown-to-html - mkdir -p -- $(XDG_CONFIG_HOME)/mutt \ + mkdir -p -- \ + $(XDG_CONFIG_HOME)/mutt \ $(XDG_CONFIG_HOME)/mutt/muttrc.d \ $(XDG_CACHE_HOME)/mutt \ - $(XDG_DATA_HOME)/mutt/autocrypt - cp -p -- mutt/muttrc $(XDG_CONFIG_HOME)/mutt - cp -p -- mutt/muttrc.d/src $(XDG_CONFIG_HOME)/mutt/muttrc.d + $(XDG_DATA_HOME)/mutt/autocrypt \ + $(HOME)/.local/share/mutt/libexec/filters + cp -p -- mutt/muttrc \ + $(XDG_CONFIG_HOME)/mutt + cp -p -- mutt/muttrc.d/src \ + $(XDG_CONFIG_HOME)/mutt/muttrc.d cp -p -- mutt/filters/markdown-to-html \ $(HOME)/.local/share/mutt/libexec/filters -- cgit v1.2.3 From 36ea801b670ec96e1e7b4893b987651664664daa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:56:03 +1200 Subject: Break path options in muttrc consistently --- mutt/muttrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 161385db..da13f3f8 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -38,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 @@ -158,7 +160,8 @@ send-hook '!~G !~g' 'push ' # use, but don't store its keys in our primary keyring. # set autocrypt -set autocrypt_dir = ~/.local/share/mutt/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 -- cgit v1.2.3 From 3c678a4e2c006b0fd95605ccc1ec67932a3357be Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:57:44 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index ee8a010d..8749314c 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v9.4.0 -Tue, 19 May 2020 10:15:37 +0000 +tejr dotfiles v9.5.0 +Tue, 19 May 2020 22:57:44 +0000 -- cgit v1.2.3 From e32e629f546cad21552d67f2c47ab57fceceb35e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 20 May 2020 10:57:45 +1200 Subject: Update PGP key --- finger/pgpkey | 3 --- 1 file changed, 3 deletions(-) diff --git a/finger/pgpkey b/finger/pgpkey index 24a1bc66..613c2623 100644 --- a/finger/pgpkey +++ b/finger/pgpkey @@ -7,8 +7,5 @@ uid [ultimate] Thomas Ryder (TEJR) uid [ultimate] Thomas Ryder uid [ultimate] Thomas Ryder sub rsa4096 2013-03-12 [E] [expires: 2020-07-31] - 9DF1 A89F F8D9 70AF 3265 C882 96C2 CD91 E67A C61D sub rsa4096 2013-03-12 [S] [expires: 2020-07-31] - 3179 90A1 4597 A1FC F82D 953A B5AF 5F89 2592 6609 sub rsa4096 2019-08-06 [A] [expires: 2020-07-31] - 42AE 569D 6162 7C52 03B0 74ED D58F F1F0 7E90 9B49 -- cgit v1.2.3