aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot_config/sh/xdg-base-dirs4
-rw-r--r--dot_kshrc2
-rw-r--r--dot_zshrc.tmpl3
3 files changed, 8 insertions, 1 deletions
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