-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.sh
82 lines (65 loc) · 2.09 KB
/
main.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
user_name="$USER"
# Function to display usage
usage() {
echo "Usage: $0 [install|uninstall] [-light]"
exit 1
}
# Function to uninstall the theme
uninstall() {
read -p "Are you sure you want to uninstall WhiteSur theme? (y/N): " confirm
if [[ "$confirm" != [yY] ]]; then
echo "Uninstallation aborted."
exit 0
fi
echo "Removing theme directories..."
rm -rf ~/WhiteSur-gtk-theme ~/WhiteSur-icon-theme ~/WhiteSur-cursors
echo "Removing installed fonts..."
for font in ~/.local/share/fonts/*; do
if [[ $(basename "$font") == *"WhiteSur"* ]]; then
rm -f "$font"
fi
done
echo "Removing wallpapers..."
rm -f ~/Pictures/monterey.png
echo "Resetting desktop background..."
gsettings reset org.gnome.desktop.background picture-uri
gsettings reset org.gnome.desktop.background picture-uri-dark
echo "Uninstall completed."
exit 0
}
# Cleaning previous directories
echo "Cleaning directories..."
rm -rf WhiteSur*
# Check for install/uninstall argument
if [[ "$1" == "uninstall" ]]; then
uninstall
elif [[ "$1" != "install" ]]; then
usage
fi
# Cloning required files
echo "Cloning required files..."
git clone https://github.com/jothi-prasath/WhiteSur-gtk-theme.git --depth=1
git clone https://github.com/vinceliuice/WhiteSur-icon-theme.git --depth=1
git clone https://github.com/vinceliuice/WhiteSur-cursors.git --depth=1
# Installing theme
if [[ -f "$2" || "$2" == '-light' ]]; then
WhiteSur-gtk-theme/install.sh -l -c Light
else
WhiteSur-gtk-theme/install.sh -l -c Dark
fi
WhiteSur-gtk-theme/tweaks.sh -F
# Icons
WhiteSur-icon-theme/install.sh -b
# Cursors
mkdir -p ~/.local/share/icons/WhiteSur-cursors
cp WhiteSur-cursors/dist/* ~/.local/share/icons/WhiteSur-cursors -prf
# Wallpapers
mkdir -p ~/Pictures/
cp -r wallpaper/* ~/Pictures/
gsettings set org.gnome.desktop.background picture-uri "file:///home/$user_name/Pictures/monterey.png"
gsettings set org.gnome.desktop.background picture-uri-dark "file:///home/$user_name/Pictures/monterey.png"
# Load settings using dconf
dconf load / < dconf/settings.dconf
# Fonts
cp fonts/* ~/.local/share/fonts/