From 88a4b2a0845afc2550411efabc9507d2dfe27c91 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Wed, 20 Dec 2023 10:32:06 -0500 Subject: Share xdg-base-dirs between ksh & zsh --- dot_config/sh/xdg-base-dirs | 4 ++++ dot_kshrc | 2 ++ dot_zshrc.tmpl | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 dot_config/sh/xdg-base-dirs diff --git a/dot_config/sh/xdg-base-dirs b/dot_config/sh/xdg-base-dirs new file mode 100644 index 0000000..18acb96 --- /dev/null +++ b/dot_config/sh/xdg-base-dirs @@ -0,0 +1,4 @@ +export XDG_CACHE_HOME="${HOME}/.cache" +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_DATA_HOME="${HOME}/.local/share" +export XDG_STATE_HOME="${HOME}/.local/state" diff --git a/dot_kshrc b/dot_kshrc index 3acab9c..9a52a09 100644 --- a/dot_kshrc +++ b/dot_kshrc @@ -6,6 +6,8 @@ export PS1=$PPROMPT export HISTFILE="$HOME/.ksh_history" export HISTSIZE=5000 +[ -f "${HOME}/.config/sh/xdg-base-dirs" ] && . "${HOME}/.config/sh/xdg-base-dirs" + export VISUAL="vim" export EDITOR="$VISUAL" set -o emacs diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index c0b1669..a9d7123 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -61,7 +61,8 @@ export BROWSER=firefox export TEXMFHOME=${HOME}/.texmf export KRB5CCNAME=DIR:${HOME}/.cache/krb5cc # kerberos credentials cache export GOPATH=${HOME}/.go -export XDG_STATE_HOME="${HOME}/.local/state" + +[ -f "${HOME}/.config/sh/xdg-base-dirs" ] && . "${HOME}/.config/sh/xdg-base-dirs" export PATH=/usr/sbin:/sbin:${PATH} case `uname` in -- cgit v1.2.3