Add support for XDG_STATE_HOME

This commit is contained in:
Danielle McLean 2021-09-22 10:21:20 +10:00
parent 3348b8bd19
commit 2018821e9f
Signed by: 00dani
GPG key ID: 9DDE1EDE01E3A605

3
zshenv
View file

@ -2,6 +2,7 @@
: ${XDG_CACHE_HOME:=~/.cache} : ${XDG_CACHE_HOME:=~/.cache}
: ${XDG_CONFIG_HOME:=~/.config} : ${XDG_CONFIG_HOME:=~/.config}
: ${XDG_DATA_HOME:=~/.local/share} : ${XDG_DATA_HOME:=~/.local/share}
: ${XDG_STATE_HOME:=~/.local/state}
# For XDG_RUNTIME_DIR, pick a temporary directory - the spec actually # For XDG_RUNTIME_DIR, pick a temporary directory - the spec actually
# *requires* that it's destroyed when the user logs out, so that's handled by a # *requires* that it's destroyed when the user logs out, so that's handled by a
@ -14,7 +15,7 @@ if ! [[ -d $XDG_RUNTIME_DIR ]]; then
mkdir -p $XDG_RUNTIME_DIR mkdir -p $XDG_RUNTIME_DIR
chmod 0700 $XDG_RUNTIME_DIR chmod 0700 $XDG_RUNTIME_DIR
fi fi
export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_RUNTIME_DIR export XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_STATE_HOME XDG_RUNTIME_DIR
# The real zsh config lives in XDG_CONFIG_HOME! ;) # The real zsh config lives in XDG_CONFIG_HOME! ;)
: ${ZDOTDIR:=$XDG_CONFIG_HOME/zsh} : ${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}