-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.command
More file actions
executable file
·33 lines (29 loc) · 1.13 KB
/
Copy pathuninstall.command
File metadata and controls
executable file
·33 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Collections for Spotify — uninstaller. Double-click in Finder.
set -u
echo "Removing Collections for Spotify…"
SPICETIFY=""
if command -v spicetify >/dev/null 2>&1; then
SPICETIFY="$(command -v spicetify)"
elif [ -x "$HOME/.spicetify/spicetify" ]; then
SPICETIFY="$HOME/.spicetify/spicetify"
fi
if [ -z "$SPICETIFY" ]; then
echo "✗ Spicetify not found — nothing to do."
read -r -p "Press Enter to close…"
exit 1
fi
USERDATA="$("$SPICETIFY" path userdata 2>/dev/null | tr -d '\r')"
[ -z "$USERDATA" ] && USERDATA="$HOME/.config/spicetify"
rm -rf "$USERDATA/CustomApps/album-collections"
echo "✓ App files removed"
# Drop it from the custom_apps list, preserving any others.
CUR="$("$SPICETIFY" config custom_apps 2>/dev/null | tr -d '\r')"
NEW="$(printf '%s' "$CUR" | tr '|' '\n' | grep -v '^album-collections$' | paste -sd '|' -)"
"$SPICETIFY" config custom_apps "$NEW" >/dev/null 2>&1
"$SPICETIFY" apply 2>/dev/null
echo "✓ Unregistered & re-applied"
echo
echo "Note: your saved collections stay in Spotify's local storage."
echo "They'll reappear if you reinstall."
read -r -p "Press Enter to close…"