diff --git a/flash b/flash index 27d7be8..5c63138 100755 --- a/flash +++ b/flash @@ -45,9 +45,10 @@ # Remember User's Starting Directory PWD="$(pwd)" # Where Decks Are Located for linux & mac +# Prefer XDG Configuration before hard coded file paths OS="$(uname)" case "$OS" in - "Darwin") DIR="$HOME/Library/Application Support/flash" ;; + "Darwin") DIR="${XDG_DATA_HOME:-HOME/Library/Application Support}/flash" ;; "Linux") DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;; *) DIR="${XDG_DATA_HOME:-$HOME/.local/share}/flash" ;; esac