-
Notifications
You must be signed in to change notification settings - Fork 10
/
gtk.sh
83 lines (74 loc) · 1.85 KB
/
gtk.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
#!/bin/bash
# sudo check
if [ `whoami` = root ];
then
echo Please do not run this script as root or using sudo
return 1 2>/dev/null
exit 1
fi
# Variable
text="button.titlebutton {
min-height: 24px;
min-width: 24px;
padding: 0;
}
button.titlebutton.close {
background-color: @error_color;
color: white;
}
button.titlebutton.maximize {
background-color: @warning_color;
color: white;
}
button.titlebutton.minimize {
background-color: green;
color: white;
}
button.titlebutton.minimize:hover {
background-color: lime;
color: white;
}"
# Check if .config exist
if [ -d /home/"$USER"/.config ]
then
echo "folder exist"
else
mkdir -p /home/"$USER"/.config
fi
# Check if gtk folder exist and create gtk.css
if [ -d /home/"$USER"/.config/gtk-2.0 ]
then
echo "folder exist"
echo "$text" | tee /home/"$USER"/.config/gtk-2.0/gtk.css
else
mkdir -p /home/"$USER"/.config/gtk-2.0
echo "$text" | tee /home/"$USER"/.config/gtk-2.0/gtk.css
fi
# Check if gtk folder exist and create gtk.css
if [ -d /home/"$USER"/.config/gtk-3.0 ]
then
echo "folder exist"
echo "$text" | tee /home/"$USER"/.config/gtk-3.0/gtk.css
else
mkdir -p /home/"$USER"/.config/gtk-3.0
echo "$text" | tee /home/"$USER"/.config/gtk-3.0/gtk.css
fi
# Check if gtk folder exist and create gtk.css
if [ -d /home/"$USER"/.config/gtk-4.0 ]
then
echo "folder exist"
echo "$text" | tee /home/"$USER"/.config/gtk-4.0/gtk.css
else
mkdir -p /home/"$USER"/.config/gtk-4.0
echo "$text" | tee /home/"$USER"/.config/gtk-4.0/gtk.css
fi
# Check if gtk folder exist and create gtk.css
if [ -d /home/"$USER"/.config/gtk-5.0 ]
then
echo "folder exist"
echo "$text" | tee /home/"$USER"/.config/gtk-5.0/gtk.css
else
mkdir -p /home/"$USER"/.config/gtk-5.0
echo "$text" | tee /home/"$USER"/.config/gtk-5.0/gtk.css
fi
echo "Completed"