-
Notifications
You must be signed in to change notification settings - Fork 0
/
gtk-inst.sh
129 lines (106 loc) · 4.17 KB
/
gtk-inst.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
MANINST="NO"
TMPFILE=$(mktemp)
dialog --menu "Which theme would you prefer to install?" 20 60 4 \
--backtitle "Theme Installer" \
1 "Install GTK Theme" \
2 "Install Windows 10 Theme" \
3 "Install Windows 11 theme" \
4 "Install MacOS Theme" 2>$TMPFILE
RESULT=$(cat $TMPFILE)
case $RESULT in
1) REPOLINK="https://github.com/vinceliuice/Fluent-icon-theme";;
2) REPOLINK="https://github.com/B00merang-Project/Windows-10/archive/refs/tags/3.2.1.zip";;
3) REPOLINK="https://github.com/yeyushengfan258/Win11-icon-theme";;
4) REPOLINK="https://github.com/vinceliuice/WhiteSur-icon-theme";;
*) bash /setup.sh;;
esac
REPODIR=${REPOLINK##*/}
clear
dialog --title "Install Conky Manager 2" \
--backtitle "Theme Installer" \
--yesno "Do you also want to install Conky Manager 2?" 7 60
response=$?
case $response in
0) CONKINST="YES";;
1) CONKINST="NO";;
255) CONKINST="YES" && echo "[ESC] key pressed. 'CONKINST variable set to [YES] by default.'";;
esac
clear
dialog --title "Install Gnome Extensions" \
--backtitle "Theme Installer" \
--yesno "Do you also want to install the Gnome Extensions for this theme?" 7 60
response=$?
case $response in
0) CONKINST="YES";;
1) CONKINST="NO";;
255) CONKINST="YES" && echo "[ESC] key pressed. 'CONKINST variable set to [YES] by default.'";;
esac
which dnf >/dev/null && { DISTRO="FEDORA"; exit 0; }
which apt-get >/dev/null && { DISTRO="DEBIAN"; }
if [[ "$DISTRO" == "DEBIAN" ]]; then
PKGMGR="apt"
REPENABLE="add-apt-repository ppa:ubuntuhandbook1/conkymanager2"
fi
if [[ "$DISTRO" == "FEDORA" ]]; then
PKGMGR="dnf"
REPENABLE="dnf copr enable geraldosimiao/conky-manager2"
fi
yes | sudo $REPENABLE
yes | sudo $PKGMGR update;
if [[ "$MANINST" == "NO" ]]; then
git clone $REPOLINK
cd $REPODIR
chmod +x install.sh
./install.sh
cd ..
rm -rf $REPODIR;
else
cd $HOME/Downloads
curl -JLO "$REPOLINK"
unzip "3.2.1.zip" -d $HOME/.themes
rm -rf $HOME/Downloads/3.2.1.zip
fi;
git clone https://github.com/vinceliuice/Fluent-gtk-theme
cd Fluent-gtk-theme
chmod +x install.sh
./install.sh
cd ..
rm -rf Fluent-gtk-theme;
git clone https://github.com/mrbvrz/segoe-ui-linux
cd segoe-ui-linux
chmod +x install.sh
yes | ./install.sh
cd ..
rm -rf segoe-ui-linux;
echo 80;
if [[ "$CONKINST" == "YES" ]]; then
sleep 3
yes | sudo $PKGMGR install conky-manager2;
fi;
if [[ "$GEXINST" == "YES" ]]; then
array=( https://extensions.gnome.org/extension/3628/arcmenu/
https://extensions.gnome.org/extension/3843/just-perfection/
https://extensions.gnome.org/extension/1160/dash-to-panel/
https://extensions.gnome.org/extension/1462/panel-date-format/
https://extensions.gnome.org/extension/4648/desktop-cube/
https://extensions.gnome.org/extension/5263/gtk4-desktop-icons-ng-ding/
https://extensions.gnome.org/extension/19/user-themes/ )
for i in "${array[@]}"
do
EXTENSION_ID=$(curl -s $i | grep -oP 'data-uuid="\K[^"]+')
VERSION_TAG=$(curl -Lfs "https://extensions.gnome.org/extension-query/?search=$EXTENSION_ID" | jq '.extensions[0] | .shell_version_map | map(.pk) | max')
wget -O ${EXTENSION_ID}.zip "https://extensions.gnome.org/download-extension/${EXTENSION_ID}.shell-extension.zip?version_tag=$VERSION_TAG"
gnome-extensions install --force ${EXTENSION_ID}.zip
if ! gnome-extensions list | grep --quiet ${EXTENSION_ID}; then
busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s ${EXTENSION_ID}
fi
gnome-extensions enable ${EXTENSION_ID}
rm ${EXTENSION_ID}.zip
done
dconf write /org/gnome/shell/extensions/panel-date-format/format "'%I:%M %p\n%Y/%m/%d'"
fi
if [[ "$GEXINST" == "YES" ]]; then dialog --backtitle "Theme Installer" --msgbox "To configure the rest of the extensions, you will have to configure them in the extensions app. You can find the extensions app via search bar or the Applications menu." 20 60
fi
dialog --backtitle "Theme Installer" --msgbox "To configure fonts, icons and the like, please open Gnome Tweaks and go to the 'Appearance' tab. You will find everything there." 20 60
bash /setup.sh