rev |
line source |
al@20963
|
1 # SliTaz package receipt v2.
|
al@20963
|
2
|
al@20963
|
3 PACKAGE="hackdorte-artwork"
|
al@21030
|
4 VERSION="2.0"
|
al@20963
|
5 CATEGORY="meta"
|
al@20963
|
6 SHORT_DESC="SliTaz artwork by Leonardo Laporte"
|
al@20963
|
7 MAINTAINER="al.bobylev@gmail.com"
|
al@21030
|
8 LICENSE="PublicDomain GPL3 CC-BY"
|
al@20963
|
9 WEB_SITE="https://github.com/SliTaz-official/hackdorte-artwork"
|
al@21057
|
10 HOST_ARCH="any"
|
al@20963
|
11
|
al@20963
|
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
|
al@20963
|
13 WGET_URL="https://github.com/SliTaz-official/hackdorte-artwork/archive/$VERSION.tar.gz"
|
al@20963
|
14
|
al@20963
|
15 SPLIT="blinder-theme chrommo-theme woodland-theme sandfive-theme \
|
al@20963
|
16 slim-theme-clean slim-theme-esperanza slim-theme-japan-art slim-theme-leaves \
|
al@21030
|
17 slim-theme-montanhoso conky-theme-onsea slitaz-backgrounds aurorials-theme \
|
al@21030
|
18 japanes-theme madeirado-theme slim-theme-control slim-theme-pilar \
|
al@21030
|
19 slim-theme-radarspider slim-theme-robotic slim-theme-sandfive"
|
al@20963
|
20
|
al@20963
|
21 COOKOPTS="!pngquant" # SLiM don't like such images processed by pngquant
|
al@20963
|
22
|
al@20963
|
23 compile_rules() {
|
al@20963
|
24 mkdir -p $install/usr/share/
|
al@20963
|
25 cp -r conky/ images/ slim/ themes/ $install/usr/share/
|
al@21030
|
26
|
al@21030
|
27 # Aurorials theme: fix warnings about unsupported options
|
al@21030
|
28 sed -i 's|^.*gradients|#&|' $install/usr/share/themes/Aurorials/gtk-2.0/gtkrc
|
al@21030
|
29
|
al@21030
|
30 # Aurorials theme: link the same image
|
al@21030
|
31 rm $install/usr/share/images/Aurorials.png
|
al@21030
|
32 ln -s ../slim/themes/Aurorials/background.png $install/usr/share/images/Aurorials.png
|
al@21030
|
33
|
al@21030
|
34 # Japanes theme: fix warnings about unsupported options
|
al@21030
|
35 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
|
al@21030
|
36 s|^.*progressbarstyle|#&|' $install/usr/share/themes/Japanes/gtk-2.0/gtkrc
|
al@21030
|
37
|
al@21030
|
38 # Madeirado theme: fix warnings about unsupported options
|
al@21030
|
39 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
|
al@21030
|
40 s|^.*progressbarstyle|#&|' $install/usr/share/themes/Madeirado/gtk-2.0/gtkrc
|
al@21030
|
41
|
al@21030
|
42 # Madeirado theme: link the same image
|
al@21030
|
43 rm $install/usr/share/images/madeirado.png
|
al@21030
|
44 ln -s ../slim/themes/Madeirado/background.png $install/usr/share/images/Madeirado.png
|
al@20963
|
45 }
|
al@20963
|
46
|
al@20963
|
47 genpkg_rules() {
|
al@20963
|
48 case $PACKAGE in
|
al@20963
|
49 hackdorte-artwork)
|
al@20963
|
50 DEPENDS="$SPLIT"
|
al@20963
|
51 ;;
|
al@20963
|
52 blinder-theme)
|
al@20963
|
53 copy Blinder/
|
al@20963
|
54 CAT="customization|Blinder theme for GTK+2 and Openbox3"
|
al@20963
|
55 TAGS="hackdorte openbox theme"
|
al@20963
|
56 # openbox-theme-blinder 20150606
|
al@20963
|
57 # https://web.archive.org/web/20151101012710/http://desktopstylish.tumblr.com/post/120897023300/blinder-the-openbox-3-theme-download
|
al@20963
|
58 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlQURSR3V5dzB4aXc
|
al@20963
|
59 ;;
|
al@20963
|
60 chrommo-theme)
|
al@20963
|
61 copy Chrommo/
|
al@20963
|
62 CAT="customization|Chrommo theme for GTK+2 and Openbox3"
|
al@20963
|
63 TAGS="hackdorte openbox theme"
|
al@20963
|
64 # openbox-theme-chrommo 20150601
|
al@20963
|
65 # http://desktopstylish.tumblr.com/post/120497586780/chrommo-openbox-3-theme-download
|
al@20963
|
66 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlcms4OHBWTVBWMmc
|
al@20963
|
67 ;;
|
al@20963
|
68 woodland-theme)
|
al@20963
|
69 copy Woodland/
|
al@20963
|
70 CAT="customization|Woodland nature theme for Openbox3"
|
al@20963
|
71 TAGS="hackdorte openbox theme"
|
al@20963
|
72 # openbox-theme-woodland 1.0
|
al@20963
|
73 # https://web.archive.org/web/20151101012710/http://desktopstylish.tumblr.com/post/120897023300/blinder-the-openbox-3-theme-download
|
al@20963
|
74 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlQURSR3V5dzB4aXc
|
al@20963
|
75 # http://people.slitaz.org/~leonardolaporte/lab.slitaz/5.0/pkg/openbox/3.6.1/openbox-theme-woodland-1.0.tar.gz
|
al@20963
|
76 ;;
|
al@20963
|
77 sandfive-theme)
|
al@20963
|
78 copy SliTaz-SandFive/
|
al@20963
|
79 CAT="customization|complete SliTaz 5.0 SandFive theme"
|
al@20963
|
80 # sandfive-theme 1.0
|
al@20963
|
81 # http://elegantspider.blogspot.com.br/2014/06/slitaz-sand-five-theme.html
|
al@20963
|
82 # sources was in the stuff near the receipt
|
al@20963
|
83 ;;
|
al@20963
|
84 slim-theme-clean)
|
al@20963
|
85 copy Clean/
|
al@20963
|
86 DEPENDS="slim"
|
al@20963
|
87 CAT="customization|Clean theme for SLiM"
|
al@20963
|
88 TAGS="hackdorte slim"
|
al@20963
|
89 # slim-theme-clean 20150602
|
al@20963
|
90 # http://desktopstylish.tumblr.com/post/120566561330/clean-slim-theme-download
|
al@20963
|
91 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlczlac2tXa01wbTQ
|
al@20963
|
92 ;;
|
al@20963
|
93 slim-theme-esperanza)
|
al@20963
|
94 copy Esperanza/
|
al@20963
|
95 DEPENDS="slim"
|
al@20963
|
96 CAT="customization|Esperanza theme for SLiM"
|
al@20963
|
97 TAGS="hackdorte slim"
|
al@20963
|
98 # slim-theme-esperanza 20150602
|
al@20963
|
99 # http://desktopstylish.tumblr.com/post/120505013200/esperanza-slim-theme-download
|
al@20963
|
100 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqldmFkeEcyXzRpLVk
|
al@20963
|
101 ;;
|
al@20963
|
102 slim-theme-japan-art)
|
al@20963
|
103 copy JapanArt/
|
al@20963
|
104 DEPENDS="slim"
|
al@20963
|
105 CAT="customization|Japan Art theme for SLiM"
|
al@20963
|
106 TAGS="hackdorte slim"
|
al@20963
|
107 # slim-theme-japan-art 20150603
|
al@20963
|
108 # http://desktopstylish.tumblr.com/post/120590949085/japan-art-slim-theme-download
|
al@20963
|
109 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlUkJHVDJrXzVFRUk
|
al@20963
|
110 ;;
|
al@20963
|
111 slim-theme-leaves)
|
al@20963
|
112 copy Leaves/
|
al@20963
|
113 DEPENDS="slim"
|
al@20963
|
114 CAT="customization|Leaves theme for SLiM"
|
al@20963
|
115 TAGS="hackdorte slim"
|
al@20963
|
116 # slim-theme-leaves 20150602
|
al@20963
|
117 # http://desktopstylish.tumblr.com/post/120510224250/leaves-slim-theme-download
|
al@20963
|
118 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqldkFkbmRCRFZVQ0k
|
al@20963
|
119 ;;
|
al@20963
|
120 slim-theme-montanhoso)
|
al@20963
|
121 copy Montanhoso/
|
al@20963
|
122 DEPENDS="slim"
|
al@20963
|
123 CAT="customization|Montanhoso theme for SLiM"
|
al@20963
|
124 TAGS="hackdorte slim"
|
al@20963
|
125 # slim-theme-montanhoso 20150526
|
al@20963
|
126 # http://desktopstylish.tumblr.com/post/120406192590/montanhoso-theme-for-the-slim-login-manager
|
al@20963
|
127 # https://drive.google.com/uc?export=download&id=0B4Re2DvqOMqlTXZZRDJWaFI4NkE
|
al@20963
|
128 ;;
|
al@20963
|
129 conky-theme-onsea)
|
al@20963
|
130 copy onsea/
|
al@20963
|
131 CAT="customization|smooth theme for conky with smoke color"
|
al@20963
|
132 ;;
|
al@20963
|
133 slitaz-backgrounds)
|
al@20963
|
134 copy slitaz-bg-control.png slitaz-bg-core.png slitaz-bg-enigma.png \
|
al@20963
|
135 slitaz-bg-fusion.png slitaz-bg-lights.png slitaz-bg-panel.png \
|
al@20963
|
136 slitaz-bg-sand.png slitaz-bg-spiders-eyes.png slitaz-bg-voyage.png \
|
al@20963
|
137 slitaz-bg-wood.png slitaz-black-floral.png slitaz-black-zen.png \
|
al@20963
|
138 slitaz-dust.png slitaz-meditation.jpg slitaz-secret-orion.png \
|
al@20963
|
139 slitaz-the-force.png slitaz-varnish.png slitaz-woodland.jpg
|
al@20963
|
140 CAT="customization|additional backgrounds for Slitaz GNU/Linux"
|
al@20963
|
141 # slitaz-backgrounds 2.1
|
al@20963
|
142 # https://github.com/hackdorte/slitaz-backgrounds
|
al@20963
|
143 # https://github.com/hackdorte/slitaz-backgrounds/archive/8f027a0.tar.gz
|
al@21030
|
144 ;;
|
al@21030
|
145 aurorials-theme)
|
al@21030
|
146 copy Aurorials/ Aurorials.png
|
al@21030
|
147 CAT="customization|Aurorials theme for GTK2, Openbox, SLiM, and wallpaper"
|
al@21030
|
148 LICENSE="GPL3"
|
al@21030
|
149 DEPENDS="gtk2-engine-murrine openbox slim"
|
al@21030
|
150 TAGS="holkfoor openbox slim wallpaper"
|
al@21030
|
151 # https://www.deviantart.com/holkfoor/art/Aurorials-pack-themes-382752941
|
al@21030
|
152 # https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2
|
al@21030
|
153 ;;
|
al@21030
|
154 japanes-theme)
|
al@21030
|
155 copy Japanes/
|
al@21030
|
156 CAT="customization|Japanes Openbox and GTK2 Theme"
|
al@21030
|
157 LICENSE="GPL3"
|
al@21030
|
158 DEPENDS="gtk-clearlooks openbox"
|
al@21030
|
159 TAGS="holkfoor openbox"
|
al@21030
|
160 # https://www.deviantart.com/holkfoor/art/Japanes-Openbox-and-GTK2-Theme-382947891
|
al@21030
|
161 # https://www.dropbox.com/s/2ronvzzogtdlmbt/Japanes_GTK2_and_Openbox.tar.bz2
|
al@21030
|
162 ;;
|
al@21030
|
163 madeirado-theme)
|
al@21030
|
164 copy Madeirado/ Madeirado.png
|
al@21030
|
165 CAT="customization|Madeirado theme for GTK2, Openbox, SLiM, and wallparer"
|
al@21030
|
166 LICENSE="GPL3"
|
al@21030
|
167 DEPENDS="gtk-clearlooks openbox slim"
|
al@21030
|
168 TAGS="holkfoor openbox slim wallpaper"
|
al@21030
|
169 # https://www.deviantart.com/holkfoor/art/Madeirado-Pack-Theme-382214228
|
al@21030
|
170 # https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2
|
al@21030
|
171 ;;
|
al@21030
|
172 slim-theme-control)
|
al@21030
|
173 copy control/
|
al@21030
|
174 CAT="customization|Control - theme for SLiM"
|
al@21030
|
175 LICENSE="CC-BY"
|
al@21030
|
176 DEPENDS="slim slitaz-configs-base"
|
al@21030
|
177 ;;
|
al@21030
|
178 slim-theme-pilar)
|
al@21030
|
179 copy pilar/
|
al@21030
|
180 CAT="customization|Pilar - theme for SLiM"
|
al@21030
|
181 LICENSE="CC-BY"
|
al@21030
|
182 DEPENDS="slim slitaz-configs-base"
|
al@21030
|
183 ;;
|
al@21030
|
184 slim-theme-radarspider)
|
al@21030
|
185 copy radarspider/
|
al@21030
|
186 CAT="customization|Radar Spider - theme for SLiM"
|
al@21030
|
187 LICENSE="CC-BY"
|
al@21030
|
188 DEPENDS="slim slitaz-configs-base"
|
al@21030
|
189 ;;
|
al@21030
|
190 slim-theme-robotic)
|
al@21030
|
191 copy robotic/
|
al@21030
|
192 CAT="customization|Robotic - theme for SLiM"
|
al@21030
|
193 LICENSE="CC-BY"
|
al@21030
|
194 DEPENDS="slim slitaz-configs-base"
|
al@21030
|
195 ;;
|
al@21030
|
196 slim-theme-sandfive)
|
al@21030
|
197 copy sandfive/
|
al@21030
|
198 CAT="customization|SliTaz SandFive - theme for SLiM"
|
al@21030
|
199 LICENSE="CC-BY"
|
al@21030
|
200 DEPENDS="slim slitaz-configs-base"
|
al@21030
|
201 ;;
|
al@20963
|
202 esac
|
al@20963
|
203 }
|
al@20963
|
204
|
al@20963
|
205
|
al@20963
|
206 # Set Openbox theme
|
al@20963
|
207 post_install_blinder_theme() {
|
al@20963
|
208 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
209 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Blinder<|' $i
|
al@20963
|
210 done
|
al@20963
|
211 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
212 }
|
al@20963
|
213
|
al@20963
|
214 # Restore Openbox theme (SliTaz)
|
al@20963
|
215 pre_remove_blinder_theme() {
|
al@20963
|
216 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
217 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@20963
|
218 done
|
al@20963
|
219 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
220 }
|
al@20963
|
221
|
al@20963
|
222
|
al@20963
|
223 # Set Openbox theme
|
al@20963
|
224 post_install_chrommo_theme() {
|
al@20963
|
225 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
226 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Chrommo<|' $i
|
al@20963
|
227 done
|
al@20963
|
228 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
229 }
|
al@20963
|
230
|
al@20963
|
231 # Restore Openbox theme (SliTaz)
|
al@20963
|
232 pre_remove_chrommo_theme() {
|
al@20963
|
233 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
234 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@20963
|
235 done
|
al@20963
|
236 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
237 }
|
al@20963
|
238
|
al@20963
|
239
|
al@20963
|
240 # Set Openbox theme
|
al@20963
|
241 post_install_woodland_theme() {
|
al@20963
|
242 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
243 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Woodland<|' $i
|
al@20963
|
244 done
|
al@20963
|
245 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
246 }
|
al@20963
|
247
|
al@20963
|
248 # Restore Openbox theme (SliTaz)
|
al@20963
|
249 pre_remove_woodland_theme() {
|
al@20963
|
250 for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
|
al@20963
|
251 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@20963
|
252 done
|
al@20963
|
253 [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
|
al@20963
|
254 }
|
al@20963
|
255
|
al@20963
|
256
|
al@20963
|
257 post_install_slim_theme_clean() {
|
al@20963
|
258 chroot "$1/" slim-theme -s Clean
|
al@20963
|
259 }
|
al@20963
|
260
|
al@20963
|
261 pre_remove_slim_theme_clean() {
|
al@20963
|
262 chroot "$1/" slim-theme -f Clean
|
al@20963
|
263 }
|
al@20963
|
264
|
al@20963
|
265
|
al@20963
|
266 post_install_slim_theme_esperanza() {
|
al@20963
|
267 chroot "$1/" slim-theme -s Esperanza
|
al@20963
|
268 }
|
al@20963
|
269
|
al@20963
|
270 pre_remove_slim_theme_esperanza() {
|
al@20963
|
271 chroot "$1/" slim-theme -f Esperanza
|
al@20963
|
272 }
|
al@20963
|
273
|
al@20963
|
274
|
al@20963
|
275 post_install_slim_theme_japan_art() {
|
al@20963
|
276 chroot "$1/" slim-theme -s JapanArt
|
al@20963
|
277 }
|
al@20963
|
278
|
al@20963
|
279 pre_remove_slim_theme_japan_art() {
|
al@20963
|
280 chroot "$1/" slim-theme -f JapanArt
|
al@20963
|
281 }
|
al@20963
|
282
|
al@20963
|
283
|
al@20963
|
284 post_install_slim_theme_leaves() {
|
al@20963
|
285 chroot "$1/" slim-theme -s Leaves
|
al@20963
|
286 }
|
al@20963
|
287
|
al@20963
|
288 pre_remove_slim_theme_leaves() {
|
al@20963
|
289 chroot "$1/" slim-theme -f Leaves
|
al@20963
|
290 }
|
al@20963
|
291
|
al@20963
|
292
|
al@20963
|
293 post_install_slim_theme_montanhoso() {
|
al@20963
|
294 chroot "$1/" slim-theme -s Montanhoso
|
al@20963
|
295 }
|
al@20963
|
296
|
al@20963
|
297 pre_remove_slim_theme_montanhoso() {
|
al@20963
|
298 chroot "$1/" slim-theme -f Montanhoso
|
al@20963
|
299 }
|
al@20967
|
300
|
al@20967
|
301
|
al@20967
|
302 post_install_conky_theme_onsea() {
|
al@20967
|
303 for i in $1/home/*; do
|
al@20967
|
304 [ -e $i/.conkyrc ] || return
|
al@20967
|
305 mv $i/.conkyrc $i/.conkyrc.bak
|
al@20967
|
306 ln -s /usr/share/conky/themes/onsea/.conkyrc $i/.conkyrc
|
al@20967
|
307 done
|
al@20967
|
308 }
|
al@20967
|
309
|
al@20967
|
310 post_remove_conky_theme_onsea() {
|
al@20967
|
311 for i in $1/home/*; do
|
al@20967
|
312 [ -e $i/.conkyrc.bak ] || return
|
al@20967
|
313 rm $i/.conkyrc
|
al@20967
|
314 mv $i/.conkyrc.bak $i/.conkyrc
|
al@20967
|
315 done
|
al@20967
|
316 }
|
al@21030
|
317
|
al@21030
|
318
|
al@21030
|
319 post_install_aurorials_theme() {
|
al@21030
|
320 # Set GTK+ Theme
|
al@21030
|
321 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
322 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
323 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i
|
al@21030
|
324 done
|
al@21030
|
325 pgrep lxsession >/dev/null && lxsession -r
|
al@21030
|
326
|
al@21030
|
327 # Set Openbox theme
|
al@21030
|
328 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
329 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i
|
al@21030
|
330 done
|
al@21030
|
331 pgrep openbox >/dev/null && openbox --reconfigure
|
al@21030
|
332
|
al@21030
|
333 # Set SLiM theme
|
al@21030
|
334 chroot "$1/" slim-theme -s Aurorials
|
al@21030
|
335
|
al@21030
|
336 # Set PCManFM wallpaper
|
al@21030
|
337 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
|
al@21030
|
338 $1/home/*/.config/pcmanfm/*/*.conf; do
|
al@21030
|
339 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i
|
al@21030
|
340 done
|
al@21030
|
341 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
|
al@21030
|
342 # Change wallpaper for current PCManFM session right now
|
al@21030
|
343 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \
|
al@21030
|
344 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
|
al@21030
|
345 fi
|
al@21030
|
346 }
|
al@21030
|
347
|
al@21030
|
348 pre_remove_aurorials_theme() {
|
al@21030
|
349 # Restore GTK+ Theme (Clearlooks Human)
|
al@21030
|
350 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
351 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
352 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
|
al@21030
|
353 done
|
al@21030
|
354 pgrep lxsession >/dev/null && lxsession -r
|
al@21030
|
355
|
al@21030
|
356 # Restore Openbox theme (SliTaz)
|
al@21030
|
357 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
358 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@21030
|
359 done
|
al@21030
|
360 pgrep openbox >/dev/null && openbox --reconfigure
|
al@21030
|
361
|
al@21030
|
362 # Restore SLiM theme
|
al@21030
|
363 chroot "$1/" slim-theme -f Madeirado
|
al@21030
|
364
|
al@21030
|
365 # Restore PCManFM wallpaper (slitaz-background.jpg)
|
al@21030
|
366 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
|
al@21030
|
367 $1/home/*/.config/pcmanfm/*/*.conf; do
|
al@21030
|
368 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
|
al@21030
|
369 done
|
al@21030
|
370 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
|
al@21030
|
371 # Change wallpaper for current PCManFM session right now
|
al@21030
|
372 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
|
al@21030
|
373 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
|
al@21030
|
374 fi
|
al@21030
|
375 }
|
al@21030
|
376
|
al@21030
|
377
|
al@21030
|
378 post_install_japanes_theme() {
|
al@21030
|
379 # Set GTK+ Theme
|
al@21030
|
380 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
381 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
382 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Japanes|' $i
|
al@21030
|
383 done
|
al@21030
|
384 pgrep lxsession >/dev/null && lxsession -r
|
al@21030
|
385
|
al@21030
|
386 # Set Openbox theme
|
al@21030
|
387 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
388 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Japanes<|' $i
|
al@21030
|
389 done
|
al@21030
|
390 pgrep openbox >/dev/null && openbox --reconfigure
|
al@21030
|
391 }
|
al@21030
|
392
|
al@21030
|
393 pre_remove_japanes_theme() {
|
al@21030
|
394 # Restore GTK+ Theme (Clearlooks Human)
|
al@21030
|
395 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
396 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
397 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
|
al@21030
|
398 done
|
al@21030
|
399 pgrep lxsession && lxsession -r
|
al@21030
|
400
|
al@21030
|
401 # Restore Openbox theme (SliTaz)
|
al@21030
|
402 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
403 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@21030
|
404 done
|
al@21030
|
405 pgrep openbox && openbox --reconfigure
|
al@21030
|
406 }
|
al@21030
|
407
|
al@21030
|
408
|
al@21030
|
409 post_install_madeirado_theme() {
|
al@21030
|
410 # Set GTK+ Theme
|
al@21030
|
411 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
412 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
413 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Madeirado|' $i
|
al@21030
|
414 done
|
al@21030
|
415 pgrep lxsession >/dev/null && lxsession -r
|
al@21030
|
416
|
al@21030
|
417 # Set Openbox theme
|
al@21030
|
418 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
419 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Madeirado<|' $i
|
al@21030
|
420 done
|
al@21030
|
421 pgrep openbox >/dev/null && openbox --reconfigure
|
al@21030
|
422
|
al@21030
|
423 # Set SLiM theme
|
al@21030
|
424 chroot "$1/" slim-theme -s Madeirado
|
al@21030
|
425
|
al@21030
|
426 # Set PCManFM wallpaper
|
al@21030
|
427 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
|
al@21030
|
428 $1/home/*/.config/pcmanfm/*/*.conf; do
|
al@21030
|
429 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Madeirado.png|' $i
|
al@21030
|
430 done
|
al@21030
|
431 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
|
al@21030
|
432 # Change wallpaper for current PCManFM session right now
|
al@21030
|
433 su -c 'pcmanfm -w /usr/share/images/Madeirado.jpg' \
|
al@21030
|
434 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
|
al@21030
|
435 fi
|
al@21030
|
436 }
|
al@21030
|
437
|
al@21030
|
438 pre_remove_madeirado_theme() {
|
al@21030
|
439 # Restore GTK+ Theme (Clearlooks Human)
|
al@21030
|
440 for i in $1/etc/xdg/lxsession/*/desktop.conf \
|
al@21030
|
441 $1/home/*/.config/lxsession/*/desktop.conf; do
|
al@21030
|
442 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
|
al@21030
|
443 done
|
al@21030
|
444 pgrep lxsession >/dev/null && lxsession -r
|
al@21030
|
445
|
al@21030
|
446 # Restore Openbox theme (SliTaz)
|
al@21030
|
447 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
|
al@21030
|
448 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
|
al@21030
|
449 done
|
al@21030
|
450 pgrep openbox >/dev/null && openbox --reconfigure
|
al@21030
|
451
|
al@21030
|
452 # Restore SLiM theme
|
al@21030
|
453 chroot "$1/" slim-theme -f Madeirado
|
al@21030
|
454
|
al@21030
|
455 # Restore PCManFM wallpaper (slitaz-background.jpg)
|
al@21030
|
456 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
|
al@21030
|
457 $1/home/*/.config/pcmanfm/*/*.conf; do
|
al@21030
|
458 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
|
al@21030
|
459 done
|
al@21030
|
460 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
|
al@21030
|
461 # Change wallpaper for current PCManFM session right now
|
al@21030
|
462 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
|
al@21030
|
463 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
|
al@21030
|
464 fi
|
al@21030
|
465 }
|
al@21030
|
466
|
al@21030
|
467
|
al@21030
|
468 post_install_slim_theme_control() {
|
al@21030
|
469 chroot "$1/" slim-theme -scontrol
|
al@21030
|
470 }
|
al@21030
|
471
|
al@21030
|
472 pre_remove_slim_theme_control() {
|
al@21030
|
473 chroot "$1/" slim-theme -fcontrol
|
al@21030
|
474 }
|
al@21030
|
475
|
al@21030
|
476
|
al@21030
|
477 post_install_slim_theme_pilar() {
|
al@21030
|
478 chroot "$1/" slim-theme -spilar
|
al@21030
|
479 }
|
al@21030
|
480
|
al@21030
|
481 pre_remove_slim_theme_pilar() {
|
al@21030
|
482 chroot "$1/" slim-theme -fpilar
|
al@21030
|
483 }
|
al@21030
|
484
|
al@21030
|
485
|
al@21030
|
486 post_install_slim_theme_radarspider() {
|
al@21030
|
487 chroot "$1/" slim-theme -sradarspider
|
al@21030
|
488 }
|
al@21030
|
489
|
al@21030
|
490 pre_remove_slim_theme_radarspider() {
|
al@21030
|
491 chroot "$1/" slim-theme -fradarspider
|
al@21030
|
492 }
|
al@21030
|
493
|
al@21030
|
494
|
al@21030
|
495 post_install_slim_theme_robotic() {
|
al@21030
|
496 chroot "$1/" slim-theme -srobotic
|
al@21030
|
497 }
|
al@21030
|
498
|
al@21030
|
499 pre_remove_slim_theme_robotic() {
|
al@21030
|
500 chroot "$1/" slim-theme -frobotic
|
al@21030
|
501 }
|
al@21030
|
502
|
al@21030
|
503
|
al@21030
|
504 post_install_slim_theme_sandfive() {
|
al@21030
|
505 chroot "$1/" slim-theme -ssandfive
|
al@21030
|
506 }
|
al@21030
|
507
|
al@21030
|
508 pre_remove_slim_theme_sandfive() {
|
al@21030
|
509 chroot "$1/" slim-theme -fsandfive
|
al@21030
|
510 }
|