forked from nana-4/materia-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·170 lines (155 loc) · 3.48 KB
/
install.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
repodir=$(cd $(dirname $0) && pwd)
srcdir=${repodir}/src
if type -p gnome-shell > /dev/null ; then
gnomever=$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -2)
else
gnomever=3.18
fi
echo
# Not enabled color: '-dark'
for color in '' '-light' ; do
for size in '' '-compact' ; do
echo Installing Flat-Plat${color}${size} ...
themedir=${destdir}/usr/share/themes/Flat-Plat${color}${size}
install -d ${themedir}
# Copy COPYING
cd ${repodir}
cp -ur \
COPYING \
${themedir}
# Install index.theme
cd ${srcdir}
cp -ur \
index${color}${size}.theme \
${themedir}/index.theme
# Install Chrome Theme/Extention
install -d ${themedir}/chrome
cd ${srcdir}/chrome
cp -ur \
"Flat-Plat Scrollbars.crx" \
"Flat-Plat${color} Theme.crx" \
${themedir}/chrome
# Install GNOME Shell Theme
install -d ${themedir}/gnome-shell
cd ${srcdir}/gnome-shell/${gnomever}
cp -ur \
extensions \
no-events.svg \
no-notifications.svg \
pad-osd.css \
process-working.svg \
${themedir}/gnome-shell
if [ "$color" != '-dark' ] ; then
cp -ur \
assets \
${themedir}/gnome-shell
else
cp -ur \
assets${color} \
${themedir}/gnome-shell/assets
fi
cp -ur \
gnome-shell${color}${size}.css \
${themedir}/gnome-shell/gnome-shell.css
glib-compile-resources \
--sourcedir=${themedir}/gnome-shell \
--target=${themedir}/gnome-shell/gnome-shell-theme.gresource \
gnome-shell-theme.gresource.xml
# Install GTK+ 2 Theme
install -d ${themedir}/gtk-2.0
cd ${srcdir}/gtk-2.0
cp -ur \
apps.rc \
hacks.rc \
main.rc \
${themedir}/gtk-2.0
if [ "$color" != '-dark' ] ; then
cp -ur \
assets \
${themedir}/gtk-2.0
else
cp -ur \
assets${color} \
${themedir}/gtk-2.0/assets
fi
cp -ur \
gtkrc${color} \
${themedir}/gtk-2.0/gtkrc
# Install GTK+ 3 Theme
install -d ${themedir}/gtk-common
cd ${srcdir}/gtk-3.0/gtk-common
cp -ur \
assets \
${themedir}/gtk-common
for version in '3.18' '3.20' '3.22' ; do
if [ "$version" == '3.18' ] ; then
install -d ${themedir}/gtk-3.0
cd ${srcdir}/gtk-3.0/${version}
cp -ur \
assets \
${themedir}/gtk-3.0
cp -ur \
gtk${color}.css \
${themedir}/gtk-3.0/gtk.css
if [ "$color" != '-dark' ] ; then
cp -ur \
gtk-dark.css \
${themedir}/gtk-3.0
fi
else
install -d ${themedir}/gtk-${version}
cd ${srcdir}/gtk-3.0/${version}
cp -ur \
assets \
${themedir}/gtk-${version}
cp -ur \
gtk${color}${size}.css \
${themedir}/gtk-${version}/gtk.css
if [ "$color" != '-dark' ] ; then
cp -ur \
gtk-dark${size}.css \
${themedir}/gtk-${version}/gtk-dark.css
fi
fi
done
# Install Metacity Theme
install -d ${themedir}/metacity-1
cd ${srcdir}/metacity-1
cp -ur \
*.svg \
${themedir}/metacity-1
if [ "$color" != '-light' ] ; then
cp -ur \
metacity-theme-2.xml \
metacity-theme-3.xml \
${themedir}/metacity-1
else
cp -ur \
metacity-theme-2${color}.xml \
${themedir}/metacity-1/metacity-theme-2.xml
cp -ur \
metacity-theme-3${color}.xml \
${themedir}/metacity-1/metacity-theme-3.xml
fi
# Install Unity Theme
install -d ${themedir}/unity
cd ${srcdir}/unity
cp -ur \
*.svg \
*.png \
*.json \
${themedir}/unity
if [ "$color" != '-light' ] ; then
cp -ur \
buttons \
${themedir}/unity
else
cp -urT \
buttons${color} \
${themedir}/unity/buttons
fi
done
done
echo
echo Done.