diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-26 21:27:44 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-26 21:27:44 +1200 |
commit | 8c5c0cdac2942b8be0195461e9760ca0674717e2 (patch) | |
tree | 1ce05887c18a32b48af14413808f4efcec6bea8c | |
parent | Merge branch 'release/v12.8.0' (diff) | |
parent | Update PGP key (diff) | |
download | dotfiles-8c5c0cdac2942b8be0195461e9760ca0674717e2.tar.gz dotfiles-8c5c0cdac2942b8be0195461e9760ca0674717e2.zip |
Merge branch 'release/v12.9.0'v12.9.0
* release/v12.9.0:
Update PGP key
Exec tmux(1) at the end of tm(1df)
Email full status output on systemd completion
Email on systemd-run is "completion" not "success"
Add missing -p flags
Install systemd units to home package path
Add systemd-run handling for mailing on completion
Stop dmenu_pass(1df) if no name selected
Extend expiry on key
Discard Neovim feature test
Explicitly cast terminal color count for comparing
Add missing space in vimrc conditional
Return empty values for XDG on non-Unix
Correct another typo in gtkrc filetype detection
-rw-r--r-- | Makefile | 41 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rwxr-xr-x | bin/dmenu_pass.sh | 1 | ||||
-rw-r--r-- | bin/tm.sh | 2 | ||||
-rw-r--r-- | finger/pgpkey | 8 | ||||
-rw-r--r-- | systemd/user/notify-email@.service | 2 | ||||
-rw-r--r-- | systemd/user/run-.service.d/50-notify-email.conf | 5 | ||||
-rw-r--r-- | vim/autoload/xdg.vim | 12 | ||||
-rw-r--r-- | vim/filetype.vim | 4 | ||||
-rw-r--r-- | vim/plugin/matchit.vim | 2 | ||||
-rw-r--r-- | vim/vimrc | 43 | ||||
-rw-r--r-- | vim/vimrc.stub | 2 |
12 files changed, 68 insertions, 58 deletions
@@ -464,16 +464,17 @@ install-i3: install-x install-less: less/less mkdir -p -- $(HOME)/.profile.d - cp -- less/profile.d/*.sh $(HOME)/.profile.d + cp -p -- less/profile.d/*.sh $(HOME)/.profile.d mkdir -p -- $(XDG_CONFIG_HOME)/less cp -p -- less/less $(XDG_CONFIG_HOME)/less/key -install-logrotate: +install-logrotate: install-systemd mkdir -p -- $(XDG_CONFIG_HOME)/logrotate \ $(XDG_CONFIG_HOME)/logrotate/config.d - cp -- logrotate/config $(XDG_CONFIG_HOME)/logrotate - mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user - cp -p -- logrotate/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user + cp -p -- logrotate/config $(XDG_CONFIG_HOME)/logrotate + cp -p -- logrotate/systemd/user/logrotate.service \ + logrotate/systemd/user/logrotate.timer \ + $(XDG_DATA_HOME)/systemd/user -systemctl --user enable logrotate.timer -systemctl --user start logrotate.timer @@ -511,10 +512,12 @@ install-ncmpcpp: cp -p -- ncmpcpp/config $(XDG_CONFIG_HOME)/ncmpcpp install-newsboat: install-systemd - mkdir -p -- $(XDG_CONFIG_HOME)/newsboat $(XDG_DATA_HOME)/newsboat - cp -p -- newsboat/config $(XDG_CONFIG_HOME)/newsboat - mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user - cp -p -- newsboat/systemd/user/* $(XDG_CONFIG_HOME)/systemd/user + mkdir -p -- $(XDG_CONFIG_HOME)/newsboat \ + $(XDG_DATA_HOME)/newsboat + cp -p -- newsboat/config \ + $(XDG_CONFIG_HOME)/newsboat + cp -p -- newsboat/systemd/user/newsboat.service \ + $(XDG_DATA_HOME)/systemd/user -systemctl --user enable newsboat.service -systemctl --user start newsboat.service @@ -587,12 +590,18 @@ install-sxhkd: install-scrot install-x cp -p -- sxhkd/xsession.d/* $(HOME)/.xsession.d install-systemd: - mkdir -p -- $(XDG_CONFIG_HOME)/systemd/user \ - $(XDG_CONFIG_HOME)/systemd/user/service.d \ - $(XDG_CONFIG_HOME)/systemd/user/notify-email@.service.d - cp -p -- systemd/user/*.service $(XDG_CONFIG_HOME)/systemd/user - cp -p -- systemd/user/service.d/*.conf $(XDG_CONFIG_HOME)/systemd/user/service.d - cp -p -- systemd/user/notify-email@.service.d/*.conf $(XDG_CONFIG_HOME)/systemd/user/notify-email@.service.d + mkdir -p -- $(XDG_DATA_HOME)/systemd/user + cp -p -- systemd/user/*.service \ + $(XDG_DATA_HOME)/systemd/user + mkdir -p -- $(XDG_DATA_HOME)/systemd/user/service.d + cp -p -- systemd/user/service.d/*.conf \ + $(XDG_DATA_HOME)/systemd/user/service.d + mkdir -p -- $(XDG_DATA_HOME)/systemd/user/notify-email@.service.d + cp -p -- systemd/user/notify-email@.service.d/*.conf \ + $(XDG_DATA_HOME)/systemd/user/notify-email@.service.d + mkdir -p -- $(XDG_DATA_HOME)/systemd/user/run-.service.d + cp -p -- systemd/user/run-.service.d/*.conf \ + $(XDG_DATA_HOME)/systemd/user/run-.service.d -systemctl --user daemon-reload # Need to install these in appropriate order to meet dependencies; could trust @@ -651,7 +660,7 @@ install-vim: GVIMRC = $(HOME)/.gvimrc install-vim-gui: install-vim - cp -- vim/gvimrc $(GVIMRC) + cp -p -- vim/gvimrc $(GVIMRC) install-vint: cp -p -- vint/vintrc.yaml $(HOME)/.vintrc.yaml @@ -1,2 +1,2 @@ -tejr dotfiles v12.8.0 -Sun, 26 Jun 2022 21:26:54 +0000 +tejr dotfiles v12.9.0 +Tue, 26 Jul 2022 09:27:38 +0000 diff --git a/bin/dmenu_pass.sh b/bin/dmenu_pass.sh index 44296439..2969cd16 100755 --- a/bin/dmenu_pass.sh +++ b/bin/dmenu_pass.sh @@ -8,6 +8,7 @@ name=$( LC_ALL=C sort -f | dmenu ) +[ -n "$name" ] || exit password=$(pass show -- "$name" | head -n 1) || exit [ -n "$password" ] || exit printf %s "$password" | xdotool type --clearmodifiers --file - \ @@ -14,4 +14,4 @@ else fi # Execute with concluded arguments -tmux "$@" +exec tmux "$@" diff --git a/finger/pgpkey b/finger/pgpkey index 3aa2c35e..c10eab51 100644 --- a/finger/pgpkey +++ b/finger/pgpkey @@ -1,4 +1,4 @@ -pub rsa4096 2013-03-12 [SC] [expires: 2022-06-30] +pub rsa4096 2013-03-12 [SC] [expires: 2023-06-30] FA09 C06E 1B67 0CD0 B2F5 DE60 C142 86EA 77BB 8872 uid [ultimate] Thomas Ryder (tyrmored, tejr) <tom@sanctum.geek.nz> uid [ultimate] Thomas Ryder <tejr@echo-n.nz> @@ -6,6 +6,6 @@ uid [ultimate] Thomas Ryder <secretary@plug.org.nz> uid [ultimate] Thomas Ryder (TEJR) <tejr@cpan.org> uid [ultimate] Thomas Ryder <tyrmored@inspire.net.nz> uid [ultimate] Thomas Ryder <tej.ryder@gmail.com> -sub rsa4096 2013-03-12 [E] [expires: 2022-06-30] -sub rsa4096 2013-03-12 [S] [expires: 2022-06-30] -sub rsa4096 2019-08-06 [A] [expires: 2022-06-30] +sub rsa4096 2013-03-12 [E] [expires: 2023-06-30] +sub rsa4096 2013-03-12 [S] [expires: 2023-06-30] +sub rsa4096 2019-08-06 [A] [expires: 2023-06-30] diff --git a/systemd/user/notify-email@.service b/systemd/user/notify-email@.service index fba9cdaf..2d356c79 100644 --- a/systemd/user/notify-email@.service +++ b/systemd/user/notify-email@.service @@ -3,5 +3,5 @@ Description=unit status mailer service for %i [Service] Type=oneshot -ExecStart=sh -c 'systemctl --user status %i | mail -a "X-systemd: %H %m %b" -s "[systemd] %i failure" %u' +ExecStart=sh -c 'systemctl --user status --full %i | mail -a "X-systemd: %H %m %b" -s "[systemd] %i failure" %u' TimeoutStartSec=1m diff --git a/systemd/user/run-.service.d/50-notify-email.conf b/systemd/user/run-.service.d/50-notify-email.conf new file mode 100644 index 00000000..e5a45b8c --- /dev/null +++ b/systemd/user/run-.service.d/50-notify-email.conf @@ -0,0 +1,5 @@ +[Unit] +OnFailure= + +[Service] +ExecStopPost=sh -c 'systemctl --user status --full %n | mail -a "X-systemd: %H %m %b" -s "[systemd] %n completed" %u' diff --git a/vim/autoload/xdg.vim b/vim/autoload/xdg.vim index 90ea9c2f..cb7adcf5 100644 --- a/vim/autoload/xdg.vim +++ b/vim/autoload/xdg.vim @@ -43,25 +43,25 @@ function! s:Dirs(name) abort endfunction function! xdg#CacheHome() abort - return s:Home('XDG_CACHE_HOME') + return has('unix') ? s:Home('XDG_CACHE_HOME') : '' endfunction function! xdg#ConfigHome() abort - return s:Home('XDG_CONFIG_HOME') + return has('unix') ? s:Home('XDG_CONFIG_HOME') : '' endfunction function! xdg#DataHome() abort - return s:Home('XDG_DATA_HOME') + return has('unix') ? s:Home('XDG_DATA_HOME') : '' endfunction function! xdg#StateHome() abort - return s:Home('XDG_STATE_HOME') + return has('unix') ? s:Home('XDG_STATE_HOME') : '' endfunction function! xdg#ConfigDirs() abort - return s:Dirs('XDG_CONFIG_DIRS') + return has('unix') ? s:Dirs('XDG_CONFIG_DIRS') : [] endfunction function! xdg#DataDirs() abort - return s:Dirs('XDG_DATA_DIRS') + return has('unix') ? s:Dirs('XDG_DATA_DIRS') : [] endfunction diff --git a/vim/filetype.vim b/vim/filetype.vim index accbe20b..589346b2 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -151,8 +151,8 @@ augroup filetypedetect \ setfiletype group " GTK settings files autocmd BufNewFile,BufRead - \ .gktrc* - \,gktrc* + \ .gtkrc* + \,gtkrc* \ setfiletype gtkrc " Vim help files autocmd BufNewFile,BufRead diff --git a/vim/plugin/matchit.vim b/vim/plugin/matchit.vim index f842bd9c..392b2728 100644 --- a/vim/plugin/matchit.vim +++ b/vim/plugin/matchit.vim @@ -1,5 +1,5 @@ " Get matchit.vim, one way or another -if has('packages') && !has('nvim') +if has('packages') packadd matchit else runtime macros/matchit.vim @@ -137,18 +137,16 @@ let $MYVIM = option#Split(&runtimepath)[0] " both the XDG_CONFIG_HOME and XDG_CONFIG_DIRS variables, or from their " defaults, using autoloaded xdg# functions. " -if has('unix') - let s:xdgconfigdirs - \ = xdg#ConfigDirs() - let s:xdgconfighome - \ = xdg#ConfigHome() - let s:xdgdatadirs - \ = xdg#DataDirs() - let s:xdgdatahome - \ = xdg#DataHome() - let s:xdgstatehome - \ = xdg#StateHome() -endif +let s:xdgconfigdirs + \ = xdg#ConfigDirs() +let s:xdgconfighome + \ = xdg#ConfigHome() +let s:xdgdatadirs + \ = xdg#DataDirs() +let s:xdgdatahome + \ = xdg#DataHome() +let s:xdgstatehome + \ = xdg#StateHome() " We put XDG_CONFIG_HOME at the front of the 'runtimepath' list with insert(), " provided it isn't empty, which is what the function returns when the @@ -163,8 +161,7 @@ endif " " Ours not to reason why... " -if exists('s:xdgconfighome') && s:xdgconfighome !=# '' - \ || exists('s:xdgconfigdirs') && !empty(s:xdgconfigdirs) +if s:xdgconfighome !=# '' || !empty(s:xdgconfigdirs) execute 'set runtimepath^='.option#Escape(join(map( \ extend( \ s:xdgconfighome !=# '' ? [s:xdgconfighome] : [], @@ -191,7 +188,7 @@ endif " v8.1.716 introduced a way to set this with an option named 'viminfofile', " but I don't see a reason to use that. " -if exists('s:xdgstatehome') && s:xdgstatehome !=# '' +if s:xdgstatehome !=# '' if !isdirectory(s:xdgstatehome) call mkdir(s:xdgstatehome, 'p', 0700) endif @@ -241,7 +238,7 @@ set history=300 " 'backupfullname', 'swapfilefullname' would have been clearer. " set backup -if exists('s:xdgstatehome') && s:xdgstatehome !=# '' +if s:xdgstatehome !=# '' if !isdirectory(s:xdgstatehome.'/backup') call mkdir(s:xdgstatehome.'/backup', 'p', 0700) endif @@ -302,7 +299,7 @@ endif " its name, in order to avoid filename collisions, since the 'directory' " option has supported that hint for much longer than 'backupdir' has. " -if exists('s:xdgstatehome') && s:xdgstatehome !=# '' +if s:xdgstatehome !=# '' if !isdirectory(s:xdgstatehome.'/swap') call mkdir(s:xdgstatehome.'/swap', 'p', 0700) endif @@ -323,7 +320,7 @@ endif " Support for these persistent undo file caches was not released until v7.3.0, " so we need to check for the feature's presence before we enable it. " -if exists('s:xdgstatehome') && s:xdgstatehome !=# '' && has('persistent_undo') +if s:xdgstatehome !=# '' && has('persistent_undo') set undofile if !isdirectory(s:xdgstatehome.'/undo') call mkdir(s:xdgstatehome.'/undo', 'p', 0700) @@ -338,7 +335,7 @@ endif " directories of this type. This isn't a comma-separated list like the others " ('backupdir', 'directory', 'spell', 'undodir') " -if exists('s:xdgstatehome') && s:xdgstatehome !=# '' && has('mksession') +if s:xdgstatehome !=# '' && has('mksession') if !isdirectory(s:xdgstatehome.'/view') call mkdir(s:xdgstatehome.'/view', 'p', 0700) endif @@ -445,8 +442,7 @@ endif " directory. " set dictionary^=/usr/share/dict/words -if exists('s:xdgdatahome') && s:xdgdatahome !=# '' - \ || exists('s:xdgdatadirs') && !empty(s:xdgdatadirs) +if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set dictionary^='.option#Escape(join(map( \ extend( \ s:xdgdatahome !=# '' ? [s:xdgdatahome] : [], @@ -465,8 +461,7 @@ endif " WordNet and MyThes-1. I had to remove the first two metadata lines from " thesaurus.txt, as Vim appeared to interpret them as part of the body data. " -if exists('s:xdgdatahome') && s:xdgdatahome !=# '' - \ || exists('s:xdgdatadirs') && !empty(s:xdgdatadirs) +if s:xdgdatahome !=# '' || !empty(s:xdgdatadirs) execute 'set thesaurus^='.option#Escape(join(map( \ extend( \ s:xdgdatahome !=# '' ? [s:xdgdatahome] : [], @@ -992,7 +987,7 @@ endif " it. " if &background ==# 'dark' - \ && (has('gui_running') || &t_Co >= 256) + \ && (has('gui_running') || str2nr(&t_Co) >= 256) \ && globpath(&runtimepath, 'colors/sahara.vim') !=# '' colorscheme sahara endif diff --git a/vim/vimrc.stub b/vim/vimrc.stub index 484e881e..486c71e0 100644 --- a/vim/vimrc.stub +++ b/vim/vimrc.stub @@ -7,7 +7,7 @@ " glory, and then stop sourcing the rest of this file. " if !&compatible && !exists('$POSIXLY_CORRECT') - if v:version >=700 && v:progname !=# 'vi' + if v:version >= 700 && v:progname !=# 'vi' runtime vimrc finish endif |