add xdg env check
This commit is contained in:
parent
ac5ce1fbe6
commit
6a15c81069
|
@ -23,6 +23,7 @@ if [[ -d "$HOME/.local/bin" ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if XDG environment variables are set or set them to default
|
# Check if XDG environment variables are set or set them to default
|
||||||
|
if command -v xdg-user-dir 1> /dev/null; then
|
||||||
if [[ -z "$XDG_DATA_HOME" ]]; then
|
if [[ -z "$XDG_DATA_HOME" ]]; then
|
||||||
export XDG_DATA_HOME=$HOME/.local/share
|
export XDG_DATA_HOME=$HOME/.local/share
|
||||||
fi
|
fi
|
||||||
|
@ -44,6 +45,7 @@ else
|
||||||
XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
|
XDG_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
|
||||||
export XDG_DOWNLOAD_DIR
|
export XDG_DOWNLOAD_DIR
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# ==============================
|
# ==============================
|
||||||
# Shell
|
# Shell
|
||||||
|
|
Loading…
Reference in a new issue