From 0fe24205f18e2b7baac7d466dbabbe202080d344 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 11 Sep 2020 16:17:42 +1200 Subject: Add XDG basedirs support shim for plenv --- Makefile | 6 +++++- cpanm/profile.d/cpanm.sh | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 cpanm/profile.d/cpanm.sh diff --git a/Makefile b/Makefile index 5139958b..a7bae4e6 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ install-bash-completion \ install-bin \ install-bin-man \ + install-cpanm \ install-curl \ install-dillo \ install-dunst \ @@ -393,6 +394,9 @@ install-bin-man: cp -p -- man/man1/*.1df $(XDG_DATA_HOME)/man/man1 cp -p -- man/man8/*.8df $(XDG_DATA_HOME)/man/man8 +install-cpanm: + cp -p -- cpanm/profile.d/*.sh $(HOME)/.profile.d + install-curl: cp -p -- curl/curlrc $(HOME)/.curlrc @@ -526,7 +530,7 @@ install-perltidy: install-sh mkdir -p -- $(XDG_CONFIG_HOME)/perltidy cp -p -- perltidy/perltidyrc $(XDG_CONFIG_HOME)/perltidy/perltidyrc -install-plenv: install-sh +install-plenv: install-sh install-cpanm cp -p -- plenv/profile.d/*.sh $(HOME)/.profile.d cp -p -- plenv/shrc.d/*.sh $(HOME)/.shrc.d diff --git a/cpanm/profile.d/cpanm.sh b/cpanm/profile.d/cpanm.sh new file mode 100644 index 00000000..98b685e3 --- /dev/null +++ b/cpanm/profile.d/cpanm.sh @@ -0,0 +1,2 @@ +PERL_CPANM_HOME=${XDG_CACHE_HOME:-$HOME/.config}/cpanm +export PERL_CPANM_HOME -- cgit v1.2.3 From 79879043f7df2dbffc090aeff7e95ac193d62c7b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 14:57:01 +1200 Subject: Add "attached are" to Mutt's drop-attach matches --- mutt/muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/muttrc b/mutt/muttrc index 1dcd810b..90cf7336 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -6,7 +6,7 @@ # reflects the usual way I refer to attachments. # set abort_noattach = ask-no -set abort_noattach_regexp = "attached is|(find|i've|see) attached" +set abort_noattach_regexp = "attached (are|is)|(find|i've|see) attached" # Don't assume I don't want to continue editing a message if I didn't change # anything to it; if I want to send a message with just my signature, that's my -- cgit v1.2.3 From 47c095a74a60a57c252f88337e69514fe833d3be Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 15:42:59 +1200 Subject: Add "I have attached" to match Mutt drop attach --- mutt/muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/muttrc b/mutt/muttrc index 90cf7336..2f0fe0df 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -6,7 +6,7 @@ # reflects the usual way I refer to attachments. # set abort_noattach = ask-no -set abort_noattach_regexp = "attached (are|is)|(find|i've|see) attached" +set abort_noattach_regexp = "attached (are|is)|(find|i have|i've|see) attached" # Don't assume I don't want to continue editing a message if I didn't change # anything to it; if I want to send a message with just my signature, that's my -- cgit v1.2.3 From 405870355238b6d0abdf0635cad9795f4c1ca44e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 15:47:00 +1200 Subject: Add settings for undofileskip.vim --- vim/after/plugin/undofileskip.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vim/after/plugin/undofileskip.vim diff --git a/vim/after/plugin/undofileskip.vim b/vim/after/plugin/undofileskip.vim new file mode 100644 index 00000000..5c21868f --- /dev/null +++ b/vim/after/plugin/undofileskip.vim @@ -0,0 +1,12 @@ +" If undofileskip.vim loaded, add a few applicable paths to its list +if !exists('g:undofileskip') + finish +endif +call extend(g:undofileskip, [ + \ '/dev/shm/*', + \ '/usr/tmp/*', + \ '/var/tmp/*', + \ '*.git/*_EDITMSG', + \ '*.git/ADD_EDIT.patch', + \ '*.git/rebase-merge/git-rebase-todo', + \]) -- cgit v1.2.3 From 9ce45df908298015a956845c05cac0ab845f7a1c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 15:57:26 +1200 Subject: Show "List-Archive:" and "X-List-Archive:" headers --- mutt/muttrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mutt/muttrc b/mutt/muttrc index 2f0fe0df..328c361f 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -186,6 +186,11 @@ my_hdr OpenPGP: id=$pgp_default_key\; \ preference=signencrypt\; \ url=https://keys.openpgp.org/vks/v1/by-fingerprint/$pgp_default_key +# Show List-Archive and X-List-Archive headers, both to show the source list, +# and to provide me with a web link to it to pass on to anyone interested. +# +unignore list-archive: x-list-archive: + # 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. -- cgit v1.2.3 From eb7c44e333d89e080f702bcd7aa24952b9ad592c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 16:00:45 +1200 Subject: Refine preferred header display in Mutt --- mutt/muttrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 328c361f..504ce9a9 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -186,8 +186,16 @@ my_hdr OpenPGP: id=$pgp_default_key\; \ preference=signencrypt\; \ url=https://keys.openpgp.org/vks/v1/by-fingerprint/$pgp_default_key -# Show List-Archive and X-List-Archive headers, both to show the source list, -# and to provide me with a web link to it to pass on to anyone interested. +# Reset whatever ignore/unignore settings we've been passed by the system +# config, and use our own basic set, excluding User-Agent and other generally +# uninteresting fields. +# +ignore * +unignore date: from: to: cc: subject: + +# Also show List-Archive and X-List-Archive headers, both to show the source +# list, and to provide me with a web link to it to pass on to anyone +# interested. # unignore list-archive: x-list-archive: -- cgit v1.2.3 From bb38a36e83eb981f5030bf26de111c9d7b1dc463 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 16:15:15 +1200 Subject: Prevent systemd units from keeping persistent undo --- vim/after/plugin/undofileskip.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/vim/after/plugin/undofileskip.vim b/vim/after/plugin/undofileskip.vim index 5c21868f..90b9410c 100644 --- a/vim/after/plugin/undofileskip.vim +++ b/vim/after/plugin/undofileskip.vim @@ -9,4 +9,26 @@ call extend(g:undofileskip, [ \ '*.git/*_EDITMSG', \ '*.git/ADD_EDIT.patch', \ '*.git/rebase-merge/git-rebase-todo', + \ '~/.config/systemd/user/?*.automount.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.device.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.mount.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.path.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.service.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.scope.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.slice.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.socket.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.swap.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.target.d/.#override.conf????????????????', + \ '~/.config/systemd/user/?*.timer.d/.#override.conf????????????????', + \ '~/.config/systemd/user/.#?*.automount????????????????', + \ '~/.config/systemd/user/.#?*.device????????????????', + \ '~/.config/systemd/user/.#?*.mount????????????????', + \ '~/.config/systemd/user/.#?*.path????????????????', + \ '~/.config/systemd/user/.#?*.service????????????????', + \ '~/.config/systemd/user/.#?*.scope????????????????', + \ '~/.config/systemd/user/.#?*.slice????????????????', + \ '~/.config/systemd/user/.#?*.socket????????????????', + \ '~/.config/systemd/user/.#?*.swap????????????????', + \ '~/.config/systemd/user/.#?*.target????????????????', + \ '~/.config/systemd/user/.#?*.timer????????????????', \]) -- cgit v1.2.3 From a37731886054ee7170aabad1a62ce61bbd5439eb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 16:29:10 +1200 Subject: Simplify systemd unit matching pattern --- vim/after/plugin/undofileskip.vim | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/vim/after/plugin/undofileskip.vim b/vim/after/plugin/undofileskip.vim index 90b9410c..07fbbe2c 100644 --- a/vim/after/plugin/undofileskip.vim +++ b/vim/after/plugin/undofileskip.vim @@ -9,26 +9,6 @@ call extend(g:undofileskip, [ \ '*.git/*_EDITMSG', \ '*.git/ADD_EDIT.patch', \ '*.git/rebase-merge/git-rebase-todo', - \ '~/.config/systemd/user/?*.automount.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.device.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.mount.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.path.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.service.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.scope.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.slice.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.socket.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.swap.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.target.d/.#override.conf????????????????', - \ '~/.config/systemd/user/?*.timer.d/.#override.conf????????????????', - \ '~/.config/systemd/user/.#?*.automount????????????????', - \ '~/.config/systemd/user/.#?*.device????????????????', - \ '~/.config/systemd/user/.#?*.mount????????????????', - \ '~/.config/systemd/user/.#?*.path????????????????', - \ '~/.config/systemd/user/.#?*.service????????????????', - \ '~/.config/systemd/user/.#?*.scope????????????????', - \ '~/.config/systemd/user/.#?*.slice????????????????', - \ '~/.config/systemd/user/.#?*.socket????????????????', - \ '~/.config/systemd/user/.#?*.swap????????????????', - \ '~/.config/systemd/user/.#?*.target????????????????', - \ '~/.config/systemd/user/.#?*.timer????????????????', + \ '*/.config/systemd/user/?*.?*.d/.#override.conf????????????????', + \ '*/.config/systemd/user/.#?*.?*????????????????', \]) -- cgit v1.2.3 From 3baad1fc30659a2c9dd8ae91c52105de54e1fc36 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 16:29:31 +1200 Subject: Break excludes up for clarity --- vim/after/plugin/undofileskip.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vim/after/plugin/undofileskip.vim b/vim/after/plugin/undofileskip.vim index 07fbbe2c..f062fe2f 100644 --- a/vim/after/plugin/undofileskip.vim +++ b/vim/after/plugin/undofileskip.vim @@ -2,13 +2,23 @@ if !exists('g:undofileskip') finish endif + +" Skip common temporary paths call extend(g:undofileskip, [ \ '/dev/shm/*', \ '/usr/tmp/*', \ '/var/tmp/*', + \]) + +" Skip Git patch edits +call extend(g:undofileskip, [ \ '*.git/*_EDITMSG', \ '*.git/ADD_EDIT.patch', \ '*.git/rebase-merge/git-rebase-todo', + \]) + +" Skip `systemctl --user edit` buffers +call extend(g:undofileskip, [ \ '*/.config/systemd/user/?*.?*.d/.#override.conf????????????????', \ '*/.config/systemd/user/.#?*.?*????????????????', \]) -- cgit v1.2.3 From 727eb9c0c5e70f38db7cf8de6bb2bfecd1c065c4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 17:26:28 +1200 Subject: Set 'backupskip', and have g:undofileskip copy it --- vim/after/plugin/undofileskip.vim | 21 ++------------- vim/vimrc | 56 ++++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/vim/after/plugin/undofileskip.vim b/vim/after/plugin/undofileskip.vim index f062fe2f..e7116940 100644 --- a/vim/after/plugin/undofileskip.vim +++ b/vim/after/plugin/undofileskip.vim @@ -3,22 +3,5 @@ if !exists('g:undofileskip') finish endif -" Skip common temporary paths -call extend(g:undofileskip, [ - \ '/dev/shm/*', - \ '/usr/tmp/*', - \ '/var/tmp/*', - \]) - -" Skip Git patch edits -call extend(g:undofileskip, [ - \ '*.git/*_EDITMSG', - \ '*.git/ADD_EDIT.patch', - \ '*.git/rebase-merge/git-rebase-todo', - \]) - -" Skip `systemctl --user edit` buffers -call extend(g:undofileskip, [ - \ '*/.config/systemd/user/?*.?*.d/.#override.conf????????????????', - \ '*/.config/systemd/user/.#?*.?*????????????????', - \]) +" Just split and copy 'backupskip' +let g:undofileskip = option#Split(&backupskip) diff --git a/vim/vimrc b/vim/vimrc index 7d4c0508..598e8bec 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 18 Jul 2020 15:09:37 UTC +" Last updated: Sat, 12 Sep 2020 05:21:43 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -246,31 +246,49 @@ endif " Files in certain directories on Unix-compatible filesystems should not be " backed up, for security reasons. This is particularly important if editing -" temporary files created by sudoedit(8). On Unix-like systems, we here add -" a few paths to the default value of 'backupskip' in order to prevent the -" creation of such undesired backup files. -" -" * /dev/shm: RAM disk, default path for password-store’s temporary files -" * /usr/tmp: Hard-coded path for sudoedit(8) [1/2] -" * /var/tmp: Hard-coded path for sudoedit(8) [2/2] -" -" Prior to v8.1.1519, Vim didn’t check patterns added to 'backupskip' for -" uniqueness, so adding the same path repeatedly resulted in duplicate strings -" in the value. This was due to the absence of the P_NODUP flag for the -" option’s definition in src/option.c in the Vim source code. If we’re using -" a version older than v8.1.1519, we’ll need to explicitly reset 'backupskip' -" to its default value before adding patterns to it, so that reloading this -" file doesn’t stack up multiple copies of any added paths. -" -" +" temporary files created by sudoedit(8). We add a few path patterns to the +" default value of 'backupskip' here, in order to prevent the creation of such +" undesired backup files. " if has#('unix') + + " Prior to v8.1.1519, Vim didn’t check patterns added to 'backupskip' for + " uniqueness, so adding the same path repeatedly resulted in duplicate strings + " in the value. This was due to the absence of the P_NODUP flag for the + " option’s definition in src/option.c in the Vim source code. If we’re using + " a version older than v8.1.1519, we’ll need to explicitly reset 'backupskip' + " to its default value before adding patterns to it, so that reloading this + " file doesn’t stack up multiple copies of any added paths. + " + " + " if !has#('patch-8.1.1519') set backupskip& endif - set backupskip^=/dev/shm/*,/usr/tmp/*,/var/tmp/* + + " Typical temporary file locations + "" RAM disk, default path for password-store’s temporary files + set backupskip+=/dev/shm/* + "" Hard-coded paths for sudoedit + set backupskip+=/usr/tmp/*,/var/tmp/* + + " Per-repository temporary files for Git + "" Commit messages + set backupskip+=*.git/*_EDITMSG + "" Patch edits + set backupskip+=*.git/ADD_EDIT.patch + "" Interactive rebase manifests + set backupskip+=*.git/rebase-merge/git-rebase-todo + + " systemd user manager unit files + "" Full unit files + set backupskip+=*/systemd/user/.#?*.?*???????????????? + "" Per-unit overrides + set backupskip+=*/systemd/user/?*.?*.d/.#override.conf???????????????? + endif + " Keep swap files for file buffers in a dedicated directory, rather than the " default of writing them to the same directory as the buffer file. Add two " trailing slashes to the path to prompt Vim to use the full escaped path in -- cgit v1.2.3 From 8ef3a5afe3839bb9981b3ddf4f62b92bc065051e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 17:26:59 +1200 Subject: Remove outdated comment on 'dictionary' setting --- vim/vimrc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 598e8bec..ef02a401 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -442,8 +442,8 @@ endif " At some point, I may end up having to set this option along with 'spellfile' " a bit more intelligently to ensure that spell checking and dictionary " function consistently, and with reference to the same resources. For the -" moment, I’ve just added another entry referring to a directory in the user -" runtime directory, but I don’t have anything distinct to put there yet. +" moment, I’ve just added additional entries referring to the user runtime +" directory. " " In much the same way, we add an expected path to a thesaurus, for completion " with CTRL-X CTRL-T in insert mode, or with ‘t’ added to 'completeopt'. The @@ -454,15 +454,6 @@ endif " to remove the first two metadata lines from thesaurus.txt, as Vim appeared " to interpret them as part of the body data. " -" Extra checks for appending the 'dictionary' and 'thesaurus' paths need to be -" made, because the P_NDNAME property is assigned to them, which enforces -" a character blacklist in the option value. We check for the expected Vim -" error code here, and if the path offends, we just skip the setting entirely, -" rather than throwing cryptic errors at the user. None of the blacklisted -" characters are particularly wise characters to have in paths, anyway, legal -" though they may be on Unix filesystems. We can’t work around this one with -" 'isfname'; the blacklist is hard-coded. -" set dictionary^=/usr/share/dict/words if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set dictionary^='.option#Escape(join(map( -- cgit v1.2.3 From a96672f216ab9b4373d0af6f86bc1e07c934c564 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 12 Sep 2020 17:30:54 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 0e46cd5d..a0eb6c25 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v10.6.0 -Mon, 07 Sep 2020 05:38:07 +0000 +tejr dotfiles v10.7.0 +Sat, 12 Sep 2020 05:30:54 +0000 -- cgit v1.2.3