From 395f1a5b569b772956ad1f4aab8770d05ab33e55 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 16:58:24 +1200 Subject: Save wget HSTS cache in XDG_CACHE_HOME One fewer dotfile! --- Makefile | 1 + wget/wgetrc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index d4769732..c9ab1d85 100644 --- a/Makefile +++ b/Makefile @@ -667,6 +667,7 @@ install-vint: cp -p -- vint/vintrc.yaml $(HOME)/.vintrc.yaml install-wget: + mkdir -p -- $(XDG_CACHE_HOME)/wget cp -p -- wget/wgetrc $(HOME)/.wgetrc install-x: check-xinit diff --git a/wget/wgetrc b/wget/wgetrc index eb3f20ba..0113feee 100644 --- a/wget/wgetrc +++ b/wget/wgetrc @@ -1,3 +1,6 @@ +# Put HSTS cache into an XDG dir, just to have one dotfile +hsts_file = ~/.cache/wget/hsts + # No, no, dig UP, stupid no_parent = on -- cgit v1.2.3 From a46d6076edcddfd1032553d17d79db4005e6be2b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 17:10:14 +1200 Subject: Move wget config into XDG --- Makefile | 7 ++++--- wget/profile.d/wget.sh | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 wget/profile.d/wget.sh diff --git a/Makefile b/Makefile index c9ab1d85..5c2ab6c8 100644 --- a/Makefile +++ b/Makefile @@ -666,9 +666,10 @@ install-vim-syntax: install-vint: cp -p -- vint/vintrc.yaml $(HOME)/.vintrc.yaml -install-wget: - mkdir -p -- $(XDG_CACHE_HOME)/wget - cp -p -- wget/wgetrc $(HOME)/.wgetrc +install-wget: install-sh + cp -p -- wget/profile.d/* $(HOME)/.profile.d + mkdir -p -- $(XDG_CACHE_HOME)/wget $(XDG_CONFIG_HOME)/wget + cp -p -- wget/wgetrc $(XDG_CONFIG_HOME)/wget/wgetrc install-x: check-xinit mkdir -p -- \ diff --git a/wget/profile.d/wget.sh b/wget/profile.d/wget.sh new file mode 100644 index 00000000..884f19ed --- /dev/null +++ b/wget/profile.d/wget.sh @@ -0,0 +1,5 @@ +# Set path to wgetrc file in XDG dirs. There's no mention of this environment +# variable in the man page! I had to check the source. +# +WGETRC=${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc +export WGETRC -- cgit v1.2.3 From ae31d2fd097db16f0a2d78de6f08ffaf21825e4a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 17:33:02 +1200 Subject: Apply XDG to xyzzy(6df) --- games/xyzzy.sh | 6 ++++-- man/man6/xyzzy.6df | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/games/xyzzy.sh b/games/xyzzy.sh index 5cc03278..b4fc4695 100644 --- a/games/xyzzy.sh +++ b/games/xyzzy.sh @@ -1,6 +1,8 @@ # ADVENTURE -if [ -e "$HOME"/.xyzzy ] ; then +state=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy/dest +mkdir -p -- "${state%/*}" +if [ -e "$state" ] ; then printf >&2 '%s\n' 'Nothing happens.' exit 1 fi -printf '%s\n' 'I see no cave here.' > "$HOME"/.xyzzy +printf '%s\n' 'I see no cave here.' > "$state" diff --git a/man/man6/xyzzy.6df b/man/man6/xyzzy.6df index 7270b95d..0d928b45 100644 --- a/man/man6/xyzzy.6df +++ b/man/man6/xyzzy.6df @@ -8,7 +8,7 @@ Invoking .B xyzzy in a directory will tag that directory as a target for teleportation, writing -its name to the file ~/.xyzzy. Typing it again at any given point will then -change into that marked directory. +its name to the file $XDG_CONFIG_HOME/xyzzy/dest. Typing it again at any given +point will then change into that marked directory. .SH AUTHOR Tom Ryder -- cgit v1.2.3 From e6ffda0bbd6343e58ea40e79a724977eda51ac30 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 17:36:41 +1200 Subject: Clean up xyzzy(6df) a bit --- games/xyzzy.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/games/xyzzy.sh b/games/xyzzy.sh index b4fc4695..ebf3959a 100644 --- a/games/xyzzy.sh +++ b/games/xyzzy.sh @@ -1,8 +1,11 @@ # ADVENTURE -state=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy/dest -mkdir -p -- "${state%/*}" -if [ -e "$state" ] ; then - printf >&2 '%s\n' 'Nothing happens.' - exit 1 +dir=${XDG_CONFIG_HOME:-$HOME/.config}/xyzzy +if ! [ -d "$dir" ] ; then + mkdir -- "$dir" || exit fi -printf '%s\n' 'I see no cave here.' > "$state" +if [ -e "$dir"/dest ] ; then + printf >&2 'Nothing happens.\n' +else + printf 'I see no cave here.\n' > "$dir"/dest +fi +exit 1 -- cgit v1.2.3 From fa50575a8526d4c77e5227e988db194415e021ba Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 23:11:35 +1200 Subject: Install bin/han as part of Bash target Blocks install on a fresh OpenBSD without Bash --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5c2ab6c8..ee57aba9 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,6 @@ BINS = bin/ap \ bin/gred \ bin/gscr \ bin/gwp \ - bin/han \ bin/hms \ bin/htdec \ bin/htenc \ @@ -376,12 +375,13 @@ install-abook: mkdir -p -- $(HOME)/.abook cp -p -- abook/abookrc $(HOME)/.abook -install-bash: check-bash install-sh - mkdir -p -- $(HOME)/.bashrc.d +install-bash: check-bash install-sh bin/han + mkdir -p -- $(HOME)/.bashrc.d $(HOME)/.local/bin cp -p -- bash/bashrc $(HOME)/.bashrc cp -p -- bash/bashrc.d/* $(HOME)/.bashrc.d cp -p -- bash/bash_profile $(HOME)/.bash_profile cp -p -- bash/bash_logout $(HOME)/.bash_logout + cp -p -- bin/han $(HOME)/.local/bin install-bash-completion: install-bash mkdir -p -- $(HOME)/.bash_completion.d $(XDG_CONFIG_HOME) -- cgit v1.2.3 From e29110cbd06254c268c8b8b61be586e69a8c85e4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 18 May 2020 23:11:50 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index ab843122..c08454fa 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v9.1.0 -Mon, 18 May 2020 01:04:03 +0000 +tejr dotfiles v9.2.0 +Mon, 18 May 2020 11:11:50 +0000 -- cgit v1.2.3