forked from linuxmint/mint-themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test
executable file
·27 lines (19 loc) · 797 Bytes
/
test
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
#!/bin/bash
# Old way (brutal)
#sudo rm -rf /usr/share/themes/Mint-*
#sudo cp -R usr /
# New way
echo "Bind mounting the theme to /usr/share/themes/Mint-X..."
sudo mount --bind usr/share/themes/Mint-X /usr/share/themes/Mint-X
if [ -d ../mint-themes-gtk3 ]; then
echo "Found mint-themes-gtk3 in parent directory. Bind mounting as well..."
[ ! -d /usr/share/themes/Mint-X/gtk-3.0 ] && mkdir /usr/share/themes/Mint-X/gtk-3.0
sudo mount --bind ../mint-themes-gtk3/usr/share/themes/Mint-X/gtk-3.0 /usr/share/themes/Mint-X/gtk-3.0
fi
read -p "Theme active. Press any key to revert..."
if [ -d ../mint-themes-gtk3 ]; then
sudo umount /usr/share/themes/Mint-X/gtk-3.0
fi
sudo umount /usr/share/themes/Mint-X
echo "Theme deactivated. Reload applications to take effect."
exit 0