-
Notifications
You must be signed in to change notification settings - Fork 18
/
uninstall.sh
45 lines (39 loc) · 1.21 KB
/
uninstall.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
set -e
cd "$(dirname "$(spicetify -c)")"
echo "Unpatching (1/3)"
if cat config-xpui.ini | grep -o '\[Patch\]'; then
while true; do
read -p "All Spicetify custom patches will be deleted. Is this ok? [y/n] " yn </dev/tty
case $yn in
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
perl -i -0777 -pe "s/\[Patch\].*?($|(\r*\n){2})//s" config-xpui.ini
fi
echo "Uninstalling (2/3)"
cd "$(dirname "$(spicetify -c)")"
spicetify config current_theme "SpicetifyDefault" color_scheme "green-dark" extensions dribbblish-dynamic.js- extensions Vibrant.min.js-
echo "Deleting (3/3)"
while true; do
read -p "Do you wish to delete theme files? [y/n] " yn </dev/tty
case $yn in
[Yy]*)
theme_dir="$(dirname "$(spicetify -c)")/Themes/DribbblishDynamic"
ext_dir="$(dirname "$(spicetify -c)")/Extensions"
rm -rf "$theme_dir"
# Use -f to ignore if missing
rm -f "$ext_dir/dribbblish-dynamic.js"
rm -f "$ext_dir/Vibrant.min.js"
break
;;
[Nn]*)
echo "Skipping deletion."
break
;;
*) echo "Please answer yes or no." ;;
esac
done
spicetify apply