From 3e0a29463e89dd47221c8b3fdd9e42702ad53f6b Mon Sep 17 00:00:00 2001 From: Thomas Teixeira Date: Sat, 21 Sep 2024 19:41:58 +0200 Subject: [PATCH] fix(install): respect XDG_CONFIG_HOME Apply the same logic that is used in _spicetify/cli/src/utils/path-utils.go:GetSpicetifyFolder_. $SPICETIFY_CONFIG_DIR is now, in order : - $SPICETIFY_CONFIG - $XDG_CONFIG_HOME/spicetify - $HOME/.config/spicetify This fixes a bug when installing `spicetify` and `marketplace` with a custom $XDG_CONFIG_HOME, making the marketplace theme and custom app invisible to spicetify. --- resources/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/install.sh b/resources/install.sh index e3d747de..34ee3356 100755 --- a/resources/install.sh +++ b/resources/install.sh @@ -23,7 +23,10 @@ echo "FETCHING Version $tag" download_uri=$releases_uri/download/v$tag/marketplace.zip default_color_uri="https://raw.githubusercontent.com/spicetify/marketplace/main/resources/color.ini" -SPICETIFY_CONFIG_DIR="${SPICETIFY_CONFIG:-$HOME/.config/spicetify}" +SPICETIFY_CONFIG_DIR="$SPICETIFY_CONFIG" +if [ -z "$SPICETIFY_CONFIG_DIR" ]; then + SPICETIFY_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/spicetify" +fi INSTALL_DIR="$SPICETIFY_CONFIG_DIR/CustomApps" if [ ! -d "$INSTALL_DIR" ]; then