-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathINSTALL
executable file
·274 lines (265 loc) · 9.14 KB
/
INSTALL
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
#!/bin/bash
# Installation script for Faenza icon themes
# Written by Tiheum ([email protected])
ROOT_UID=0
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Icon themes will be installed in $HOME/.icons. To make them available for all users, run this script as root."
else
echo "Icon themes will be installed in /usr/share/icons and are available for all users."
fi
read -p "Do you want to continue ? [Y]es, [N]o : " response
case $response in
[Yy]* ) ;;
[Nn]* ) exit 99;;
* ) echo "Wrong value: installaton aborted."; exit 1;;
esac
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
cd $DIR
echo
read -p "What distributor logo would you use ? [A]rchlinux, [D]ebian, [f]edora, [F]rugalware, [G]entoo, [L]inux Mint, [O]pensuse, [M]andriva, [S]lackware, [U]buntu : " distro
distro="${input:-$distro}"
case $distro in
[Aa]* ) distributor="archlinux";;
[Dd]* )
distributor="debian"
cd ./Faenza/apps/scalable/ && ln -sf ./softwarecenter-$distributor.svg softwarecenter.svg && cd ../../..
for size in 48 32 24 22 16; do
cd ./Faenza/apps/48/ && ln -sf ./softwarecenter-$distributor.png softwarecenter.png && cd ../../..
done
;;
[f]* ) distributor="fedora";;
[F]* ) distributor="frugalware";;
[Gg]* ) distributor="gentoo";;
[Ll]* ) distributor="linux-mint";;
[Oo]* ) distributor="opensuse";;
[Mm]* ) distributor="mandriva";;
[Ss]* ) distributor="slackware";;
[Uu]* ) distributor="ubuntu";;
* ) echo "Wrong value: installaton aborted."; exit 1;;
esac
iconname="distributor-logo-$distributor"
cd ./Faenza/places/scalable/ && ln -sf ./$iconname.svg distributor-logo.svg && cd ../../..
for size in 48 32 24 22; do
cd ./Faenza/places/$size/ && ln -sf ./$iconname.png distributor-logo.png && cd ../../..
done
echo
read -p "What icon would you use for Gnome main menu ? [G]nome Foot, [D]istributor logo, [M]onochrome ditributor logo : " logo
logo="${input:-$logo}"
case $logo in
[Gg]* ) iconname="start-here-gnome";;
[Mm]* ) iconname="start-here-$distributor";;
[Dd]* ) ;;
* ) echo "Wrong value: installaton aborted."; exit 1;;
esac
for theme in Faenza Faenza-Dark; do
cd ./$theme/places/scalable/ && ln -sf ./$iconname.svg start-here.svg && ln -sf ./$iconname-symbolic.svg start-here-symbolic.svg && cd ../../..
for size in 48 32 24 22; do
cd ./$theme/places/$size/ && ln -sf ./$iconname.png start-here.png && cd ../../..
done
done
if [ -d $HOME/.icons/Faenza ]
then
echo
read -p "An existing installation have been detected in $HOME/.icons. Remove it previously ? [Y]es, [N]o :" response
case $response in
[Yy]* ) rm -Rf $HOME/.icons/Faenza 2>/dev/null; rm -Rf $HOME/.icons/Faenza-Dark 2>/dev/null; rm -Rf $HOME/.icons/Faenza-Darkest 2>/dev/null; rm -Rf $HOME/.icons/Faenza-Darker 2>/dev/null; rm -Rf $HOME/.icons/Faenza-Ambiance 2>/dev/null; rm -Rf $HOME/.icons/Faenza-Radiance 2>/dev/null;;
* ) ;;
esac
fi
if [ "$UID" -eq "$ROOT_UID" ]
then
if [ -d /usr/share/icons/Faenza ]
then
echo
read -p "An existing installation has been detected in /usr/share/icons. Remove it previously ? [Y]es, [N]o :" response
case $response in
[Yy]* ) rm -Rf /usr/share/icons/Faenza 2>/dev/null; rm -Rf /usr/share/icons/Faenza-Dark 2>/dev/null; rm -Rf /usr/share/icons/Faenza-Darker 2>/dev/null; rm -Rf /usr/share/icons/Faenza-Darkest 2>/dev/null; rm -Rf /usr/share/icons/Faenza-Ambiance 2>/dev/null; rm -Rf /usr/share/icons/Faenza-Radiance 2>/dev/null;;
* ) ;;
esac
echo
fi
cp -R ./Faenza/ /usr/share/icons/
cp -R ./Faenza-Dark/ /usr/share/icons/
cp -R ./Faenza-Darkest/ /usr/share/icons/
cp -R ./Faenza-Darker/ /usr/share/icons/
cp -R ./Faenza-Ambiance/ /usr/share/icons/
cp -R ./Faenza-Radiance/ /usr/share/icons/
cp -R ./emesene /usr/share
install_dir=/usr/share/icons/
else
cp -R ./Faenza/ $HOME/.icons/
cp -R ./Faenza-Dark/ $HOME/.icons/
cp -R ./Faenza-Darkest/ $HOME/.icons/
cp -R ./Faenza-Darker/ $HOME/.icons/
cp -R ./Faenza-Ambiance/ $HOME/.icons/
cp -R ./Faenza-Radiance/ $HOME/.icons/
install_dir=$HOME/.icons/
fi
echo
read -p "Do you want to replace some 22x22 applications icons by their monochrome conterpart to be displayed in system tray ? [Y]es, [N]o :" response
current_dir=$(pwd)
case $response in
[Yy]* )
for theme in Faenza Faenza-Dark
do
cd $install_dir/$theme/apps/22
if [ "$theme" = "Faenza" ]; then
echo "...CoverGloobus..."
fi
ln -sf $install_dir/$theme/status/22/covergloobus-panel.png ./covergloobus.png
if [ "$theme" = "Faenza" ]; then
echo "...Deluge..."
fi
ln -sf $install_dir/$theme/status/22/deluge-panel.png ./deluge.png
if [ "$theme" = "Faenza" ]; then
echo "...Exaile..."
fi
ln -sf $install_dir/$theme/status/22/exaile-panel.png ./exaile.png
if [ "$theme" = "Faenza" ]; then
echo "...Fusion Icon..."
fi
ln -sf $install_dir/$theme/status/22/fusion-icon-symbolic.png ./fusion-icon.png
if [ "$theme" = "Faenza" ]; then
echo "...Gnome-do..."
fi
ln -sf $install_dir/$theme/status/22/gnome-do-panel.png ./gnome-do.png
if [ "$theme" = "Faenza" ]; then
echo "...iBus..."
fi
ln -sf $install_dir/$theme/status/22/ibus-panel.png ./ibus.png
if [ "$theme" = "Faenza" ]; then
echo "...Kupfer..."
fi
ln -sf $install_dir/$theme/status/22/kupfer-panel.png ./kupfer.png
if [ "$theme" = "Faenza" ]; then
echo "...Me TV..."
fi
ln -sf $install_dir/$theme/status/22/me-tv-panel.png ./me-tv.png
if [ "$theme" = "Faenza" ]; then
echo "...Zim..."
fi
ln -sf $install_dir/$theme/status/22/zim-panel.png ./zim.png
done
;;
* ) ;;
esac
cd $current_dir
if [ "$UID" -eq "$ROOT_UID" ]
then
echo
echo "The following operation change some system settings: use it at your own risk !"
read -p "Do you want to replace some default applications icons by Faenza ones ? [D]ark theme ones, [L]ight theme ones, [N]one :" response
case $response in
[DdLl]* )
echo "...Rhythmbox..."
dir="/usr/lib/rhythmbox/plugins/audioscrobbler"
if [ -e $dir/as-icon.png ]
then
mv -n $dir/as-icon.png $dir/as-icon.default.png 2>/dev/null
ln -sf /usr/share/icons/Faenza/apps/22/lastfm-audioscrobbler.png $dir/as-icon.png 2>/dev/null
fi
dir="/usr/lib/rhythmbox/plugins/umusicstore"
if [ -e $dir/musicstore_icon.png ]
then
mv -n $dir/musicstore_icon.png $dir/musicstore_icon.default.png 2>/dev/null
ln -sf /usr/share/icons/Faenza/apps/22/umusicstore.png $dir/musicstore_icon.png 2>/dev/null
fi
echo "...Skype for Dockmanager..."
dir="/usr/share/dockmanager/data"
for file in skype_away skype_dnd skype_invisible skype_na skype_offline skype_online skype_skypeme
do
if [ -e $dir/$file.svg ]
then
mv -n $dir/$file.svg $dir/$file.default.svg 2>/dev/null
ln -sf /usr/share/icons/Faenza/status/scalable/$file.svg $dir/$file.svg 2>/dev/null
fi
done
case $response in
[Ll]* )
theme=Faenza
;;
[Dd]* )
theme=Faenza-Dark
;;
* ) ;;
esac
#echo "...DeadBeef..."
#dir="/usr/share/deadbeef/pixmaps"
#for file in play_24
#do
# if [ -e $dir/$file.png ]
# then
# mv $dir/$file.png $dir/$file.default.png 2>/dev/null
# ln -sf /usr/share/icons/$theme/extras/deadbeef/pixmaps/$file.png $dir/$file.png 2>/dev/null
# fi
#done
echo "...Guake..."
dir="/usr/share/pixmaps/guake"
for file in guake-notification
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/Faenza/apps/48/$file.png $dir/$file.png 2>/dev/null
fi
done
for file in guake-tray
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/$theme/extras/pixmaps/guake/$file.png $dir/$file.png 2>/dev/null
fi
done
echo "...KeepassX..."
dir="/usr/share/keepassx/icons"
for file in keepassx
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/$theme/extras/keepassx/icons/$file.png $dir/$file.png 2>/dev/null
fi
done
echo "...LastFm..."
dir="/usr/share/lastfm/icons"
for file in user_black22 user_blue22 user_green22 user_orange22 user_red22
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/$theme/extras/lastfm/icons/$file.png $dir/$file.png 2>/dev/null
fi
done
echo "...Liferea..."
dir="/usr/share/liferea/pixmaps"
for file in available available_offline empty empty_offline
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/$theme/extras/liferea/pixmaps/$file.png $dir/$file.png 2>/dev/null
fi
done
echo "...RadioTray..."
dir="/usr/share/radiotray/images"
for file in radiotray_connecting radiotray_off radiotray_on
do
if [ -e $dir/$file.png ]
then
mv -n $dir/$file.png $dir/$file.default.png 2>/dev/null
ln -sf /usr/share/icons/$theme/extras/radiotray/images/$file.png $dir/$file.png 2>/dev/null
fi
done
echo "Default icons can be restored by running UNINSTALL script or reinstall the applications with your package manager."
;;
*)
rm -Rf $install_dir/Faenza/extras
rm -Rf $install_dir/Faenza-Dark/extras
;;
esac
fi
echo
echo "Installation complete. Enjoy !"
exit 0