wok annotate aurorials-theme/receipt @ rev 18888
Add aurorials-theme and madeirado-theme (Art by Leonardo Laporte, theme switchers mine)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Feb 12 15:51:10 2016 +0200 (2016-02-12) |
parents | |
children | f8b381f96ad6 |
rev | line source |
---|---|
al@18888 | 1 # SliTaz package receipt. |
al@18888 | 2 |
al@18888 | 3 PACKAGE="aurorials-theme" |
al@18888 | 4 VERSION="20130704" |
al@18888 | 5 CATEGORY="misc" |
al@18888 | 6 SHORT_DESC="Aurorials theme for GTK2, Openbox, SLiM, and wallparer" |
al@18888 | 7 MAINTAINER="al.bobylev@gmail.com" |
al@18888 | 8 LICENSE="GPL3" |
al@18888 | 9 WEB_SITE="http://holkfoor.deviantart.com/art/Aurorials-pack-themes-382752941" |
al@18888 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
al@18888 | 11 WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2" |
al@18888 | 12 |
al@18888 | 13 DEPENDS="gtk2-engine-murrine openbox slim" |
al@18888 | 14 BUILD_DEPENDS="imagemagick" |
al@18888 | 15 |
al@18888 | 16 # Rules to configure and make the package. |
al@18888 | 17 compile_rules() |
al@18888 | 18 { |
al@18888 | 19 A=Aurorials |
al@18888 | 20 s=$install/usr/share/slim/themes |
al@18888 | 21 t=$install/usr/share/themes |
al@18888 | 22 i=$install/usr/share/images |
al@18888 | 23 mkdir -p $s $t $i |
al@18888 | 24 |
al@18888 | 25 # SLiM theme |
al@18888 | 26 cp -a $src/Slim/$A $s |
al@18888 | 27 ( |
al@18888 | 28 cd $s/$A; |
al@18888 | 29 convert background.png background.jpg; |
al@18888 | 30 rm background.png |
al@18888 | 31 ) |
al@18888 | 32 |
al@18888 | 33 # GTK theme |
al@18888 | 34 cp -a $src/GTK2/$A $t |
al@18888 | 35 # (fix warnings about unsupported options) |
al@18888 | 36 sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc |
al@18888 | 37 |
al@18888 | 38 # wallpaper |
al@18888 | 39 ln -s ../slim/themes/$A/background.jpg $i/$A.jpg |
al@18888 | 40 } |
al@18888 | 41 |
al@18888 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@18888 | 43 genpkg_rules() |
al@18888 | 44 { |
al@18888 | 45 cp -a $install/* $fs |
al@18888 | 46 } |
al@18888 | 47 |
al@18888 | 48 post_install() |
al@18888 | 49 { |
al@18888 | 50 # Set GTK+ Theme |
al@18888 | 51 for i in $1/etc/xdg/lxsession/*/desktop.conf \ |
al@18888 | 52 $1/home/*/.config/lxsession/*/desktop.conf; do |
al@18888 | 53 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i |
al@18888 | 54 done |
al@18888 | 55 pgrep lxsession && lxsession -r |
al@18888 | 56 |
al@18888 | 57 # Set Openbox theme |
al@18888 | 58 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do |
al@18888 | 59 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i |
al@18888 | 60 done |
al@18888 | 61 pgrep openbox && openbox --reconfigure |
al@18888 | 62 |
al@18888 | 63 # Set SLiM theme |
al@18888 | 64 chroot "$1/" slim-theme -s Aurorials |
al@18888 | 65 |
al@18888 | 66 # Set PCManFM wallpaper |
al@18888 | 67 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ |
al@18888 | 68 $1/home/*/.config/pcmanfm/*/*.conf; do |
al@18888 | 69 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i |
al@18888 | 70 done |
al@18888 | 71 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then |
al@18888 | 72 # Change wallpaper for current PCManFM session right now |
al@18888 | 73 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \ |
al@18888 | 74 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') |
al@18888 | 75 fi |
al@18888 | 76 } |
al@18888 | 77 |
al@18888 | 78 pre_remove() { |
al@18888 | 79 # Restore GTK+ Theme (Clearlooks Human) |
al@18888 | 80 for i in $1/etc/xdg/lxsession/*/desktop.conf \ |
al@18888 | 81 $1/home/*/.config/lxsession/*/desktop.conf; do |
al@18888 | 82 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i |
al@18888 | 83 done |
al@18888 | 84 pgrep lxsession && lxsession -r |
al@18888 | 85 |
al@18888 | 86 # Restore Openbox theme (SliTaz) |
al@18888 | 87 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do |
al@18888 | 88 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i |
al@18888 | 89 done |
al@18888 | 90 pgrep openbox && openbox --reconfigure |
al@18888 | 91 |
al@18888 | 92 # Restore SLiM theme |
al@18888 | 93 chroot "$1/" slim-theme -f Madeirado |
al@18888 | 94 |
al@18888 | 95 # Restore PCManFM wallpaper (slitaz-background.jpg) |
al@18888 | 96 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ |
al@18888 | 97 $1/home/*/.config/pcmanfm/*/*.conf; do |
al@18888 | 98 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i |
al@18888 | 99 done |
al@18888 | 100 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then |
al@18888 | 101 # Change wallpaper for current PCManFM session right now |
al@18888 | 102 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \ |
al@18888 | 103 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') |
al@18888 | 104 fi |
al@18888 | 105 } |