Skip to content

Commit

Permalink
fix(install): respect XDG_CONFIG_HOME (#839)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Betelgeuse1 authored Sep 23, 2024
1 parent 4751c1f commit 8d38e99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d38e99

Please sign in to comment.