Add code to automatically create the XDG symlinks I need.

This commit is contained in:
2026-01-12 14:28:59 +01:00
parent b12a2fa904
commit ff2fc8b1f2

View File

@@ -15,6 +15,13 @@ export XDG_DATA_HOME="$HOME/.local/share" # ~/.local/share /usr/share
export XDG_STATE_HOME="$HOME/.var/lib" # ~/.local/state /var/lib export XDG_STATE_HOME="$HOME/.var/lib" # ~/.local/state /var/lib
export XDG_CACHE_HOME="$HOME/.var/cache" # ~/.cache /var/cache export XDG_CACHE_HOME="$HOME/.var/cache" # ~/.cache /var/cache
# Create symlinks from the defaults to our configured locations
# Since, not all applications follow the XDG base directory rules.
[ -L "$HOME/.local/state" ] ||
ln -sf "$XDG_STATE_HOME" "$HOME/.local/state"
[ -L "$HOME/.cache" ] ||
ln -sf "$XDG_CACHE_HOME" "$HOME/.cache"
export PATH=".local/bin:$PATH" export PATH=".local/bin:$PATH"
if command -v nvim >/dev/null; then if command -v nvim >/dev/null; then