From 1491c998a3d0a9b2ccd902a3a0bd1637c0056969 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Thu, 5 Nov 2020 12:37:19 +0100 Subject: [PATCH] zsh:profile: More XDG Base Dir env-vars + wgetrc Use an environment variable and a wgetrc instead of an alias for wget to enforce the XDG Base Directory Specification so that script calls respect it too. --- .config/wget/wgetrc | 1 + .config/zsh/.zprofile | 2 ++ .config/zsh/plugins/alias.zsh | 4 ---- 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 .config/wget/wgetrc diff --git a/.config/wget/wgetrc b/.config/wget/wgetrc new file mode 100644 index 0000000..de0ff2e --- /dev/null +++ b/.config/wget/wgetrc @@ -0,0 +1 @@ +hsts-file = /home/user/.local/share/wget/wget-hsts diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index d45fb3c..13c56ae 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -10,6 +10,8 @@ export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export GNUPGHOME="$XDG_DATA_HOME"/gnupg export GOPATH="$XDG_DATA_HOME"/go +export MPLAYER_HOME="$XDG_CONFIG_HOME"/mplayer +export WGETRC="$XDG_CONFIG_HOME"/wget/wgetrc export HISTFILE="$XDG_DATA_HOME"/bash/history export LESSHISTFILE=/dev/null diff --git a/.config/zsh/plugins/alias.zsh b/.config/zsh/plugins/alias.zsh index a68643a..540a38e 100644 --- a/.config/zsh/plugins/alias.zsh +++ b/.config/zsh/plugins/alias.zsh @@ -12,10 +12,6 @@ alias feh='feh -.' # XDG Base Directory Specification - alias wget=' - wget --config="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc" \ - --hsts-file="${XDG_DATA_HOME:-$HOME/.local/share}/wget/wget-hsts" - ' alias tmux='tmux -f "${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"' alias tmsu='tmsu -D "${XDG_DATA_HOME:-$HOME/.local/share}/tmsu/db"' alias yarn='yarn --use-yarnrc "${XDG_CONFIG_HOME:-$HOME/.config}"/yarn/config'