This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
adw-colors.sh
92 lines (84 loc) · 1.6 KB
/
adw-colors.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
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
# Easy maintenance stuff
owner="AtiusAmy"
repo="AdwaitaColors"
version="1.0"
checkForDeps() {
if ! command wget --help &> /dev/null; then
echo "wget is not installed, please install it"
exit
fi
if ! command unzip --help &> /dev/null; then
echo "unzip is not installed, please install it"
exit
fi
}
installColor() {
location="${HOME}/.local/share/icons/"
color=$1
wget -N -P "${location}" "https://github.com/${owner}/${repo}/releases/download/1.0/Adwaita-${color}.zip"
unzip -o "${location}Adwaita-${color}.zip" -d "${location}"
rm "${location}Adwaita-${color}.zip"
sleep 0.5s
gsettings set org.gnome.desktop.interface icon-theme Adwaita-${color}
}
colorChoise() {
echo "Select the color you would like to apply."
echo "Available options are:"
echo " [1] Red"
echo " [2] Orange"
echo " [3] Yellow"
echo " [4] Green"
echo " [5] Magenta"
echo " [6] Purple"
echo " [7] Brown"
echo " [8] Gray"
echo " [0] Quit"
echo -n "Enter the number of the color you wish to apply: "
while true; do
read -r answer
case $answer in
0)
exit
;;
1)
installColor red
break
;;
2)
installColor orange
break
;;
3)
installColor yellow
break
;;
4)
installColor green
break
;;
5)
installColor magenta
break
;;
6)
installColor purple
break
;;
7)
installColor brown
break
;;
8)
installColor gray
break
;;
*)
echo -n "Enter the number of the color you wish to apply: "
;;
esac
done
}
checkForDeps
colorChoise