# SliTaz package receipt. PACKAGE="madeirado-theme" VERSION="20130702" CATEGORY="customization" SHORT_DESC="Madeirado theme for GTK2, Openbox, SLiM, and wallparer" MAINTAINER="al.bobylev@gmail.com" LICENSE="GPL3" WEB_SITE="https://holkfoor.deviantart.com/art/Madeirado-Pack-Theme-382214228" TARBALL="$PACKAGE-$VERSION.tar.bz2" WGET_URL="https://web.archive.org/web/20230129190806if_/https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2" TAGS="holkfoor openbox slim wallpaper" #HOST_ARCH="any" # imagemagick missing in arm DEPENDS="gtk-clearlooks openbox slim" BUILD_DEPENDS="wget imagemagick" # What is the latest version available today? current_version() { wget -O - $WEB_SITE 2>/dev/null | \ sed 's|}|}\n|g;s|/dev/null && lxsession -r # Set Openbox theme for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do [ -f $i ] && sed -i '//,// s|>[^<]*<|>Madeirado<|' $i done pgrep openbox >/dev/null && openbox --reconfigure # Set SLiM theme chroot "$1/" slim-theme -s Madeirado # Set PCManFM wallpaper for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ $1/home/*/.config/pcmanfm/*/*.conf; do [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Madeirado.jpg|' $i done if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then # Change wallpaper for current PCManFM session right now su -c 'pcmanfm -w /usr/share/images/Madeirado.jpg' \ $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') fi } pre_remove() { # Restore GTK+ Theme (Clearlooks Human) for i in $1/etc/xdg/lxsession/*/desktop.conf \ $1/home/*/.config/lxsession/*/desktop.conf; do [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i done pgrep lxsession >/dev/null && lxsession -r # Restore Openbox theme (SliTaz) for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do [ -f $i ] && sed -i '//,// s|>[^<]*<|>SliTaz<|' $i done pgrep openbox >/dev/null && openbox --reconfigure # Restore SLiM theme chroot "$1/" slim-theme -f Madeirado # Restore PCManFM wallpaper (slitaz-background.jpg) for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ $1/home/*/.config/pcmanfm/*/*.conf; do [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i done if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then # Change wallpaper for current PCManFM session right now su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \ $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') fi }