One may edit /etc/zsh/zshenv
to set $XDG_CONFIG_HOME
directories and $ZDOTDIR
. This require write privilegies on this files though.
So provided that $HOME
is defined when zsh read it (I don't know if it's the case), you may add to your /etc/zsh/zshenv
:
if [[ -z "$XDG_CONFIG_HOME" ]]
then
export XDG_CONFIG_HOME="$HOME/.config/"
fi
if [[ -d "$XDG_CONFIG_HOME/zsh" ]]
then
export ZDOTDIR="$XDG_CONFIG_HOME/zsh/"
fi