diff options
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | games/xyzzy.sh | 13 | ||||
-rw-r--r-- | man/man6/xyzzy.6df | 4 | ||||
-rw-r--r-- | wget/profile.d/wget.sh | 5 | ||||
-rw-r--r-- | wget/wgetrc | 3 |
6 files changed, 28 insertions, 13 deletions
@@ -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) @@ -666,8 +666,10 @@ install-vim-syntax: install-vint: cp -p -- vint/vintrc.yaml $(HOME)/.vintrc.yaml -install-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 -- \ @@ -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 diff --git a/games/xyzzy.sh b/games/xyzzy.sh index 5cc03278..ebf3959a 100644 --- a/games/xyzzy.sh +++ b/games/xyzzy.sh @@ -1,6 +1,11 @@ # ADVENTURE -if [ -e "$HOME"/.xyzzy ] ; 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.' > "$HOME"/.xyzzy +if [ -e "$dir"/dest ] ; then + printf >&2 'Nothing happens.\n' +else + printf 'I see no cave here.\n' > "$dir"/dest +fi +exit 1 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 <tom@sanctum.geek.nz> 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 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 |