home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #gtk theme selector
-
- #/etc/gtk/ has gtkrc, which has the current theme.
- #this folder has other themes, the files are named
- #gtkrc.something.
-
- CURRENTTHEME="`cat /etc/gtk/current-theme`"
-
- STATUSORIGINAL="off"
- STATUSBASIC="off"
- STATUSNOTIF2="off"
- STATUSQUIET="off"
- STATUSFOREST="off"
- STATUSPEACH="off"
- STATUSWEARY="off"
- STATUSGREY="off"
- STATUSREDBLUE="off"
- STATUSCUSTARD="off"
- STATUSXP="off"
- STATUSBLUEX="off"
-
- if [ "$CURRENTTHEME" = "original" ];then
- STATUSORIGINAL="on"
- fi
- if [ "$CURRENTTHEME" = "basic" ];then
- STATUSBASIC="on"
- fi
- if [ "$CURRENTTHEME" = "notif2" ];then
- STATUSNOTIF2="on"
- fi
- if [ "$CURRENTTHEME" = "quiet" ];then
- STATUSQUIET="on"
- fi
- if [ "$CURRENTTHEME" = "forest" ];then
- STATUSFOREST="on"
- fi
- if [ "$CURRENTTHEME" = "peach" ];then
- STATUSPEACH="on"
- fi
- if [ "$CURRENTTHEME" = "weary" ];then
- STATUSWEARY="on"
- fi
- if [ "$CURRENTTHEME" = "grey" ];then
- STATUSGREY="on"
- fi
- if [ "$CURRENTTHEME" = "redblue" ];then
- STATUSREDBLUE="on"
- fi
- if [ "$CURRENTTHEME" = "custard" ];then
- STATUSCUSTARD="on"
- fi
- if [ "$CURRENTTHEME" = "xp" ];then
- STATUSXP="on"
- fi
- if [ "$CURRENTTHEME" = "blueX" ];then
- STATUSBLUEX="on"
- fi
-
- RESULTOK="`Xdialog --wmclass "gtktheme" --title "GTK theme selector" --no-tags --stdout \
- --icon /usr/share/images/themesthumbs.xpm \
- --radiolist "" 38 34 10 \
- "original" "Default color theme" $STATUSORIGINAL \
- "basic" "Basic, similar to default" $STATUSBASIC \
- "notif2" "Notif 2, similar to Motif" $STATUSNOTIF2 \
- "quiet" "Quiet, light grey pattern" $STATUSQUIET \
- "grey" "Simple dark grey" $STATUSGREY \
- "peach" "Pastel orange and peach" $STATUSPEACH \
- "weary" "Weary, dark blue" $STATUSWEARY \
- "redblue" "Red-n-blue" $STATUSREDBLUE \
- "xp" "Windows XP" $STATUSXP \
- "custard" "Custard, light green" $STATUSCUSTARD \
- "forest" "Forest Green" $STATUSFOREST \
- "blueX" "blueX" $STATUSBLUEX 2> /dev/null `"
-
- STATUSRET=$?
-
- if [ ! $STATUSRET -eq 0 ];then
- exit
- fi
-
- rm -f /etc/gtk/gtkrc
- sync
- echo -n $RESULTOK > /etc/gtk/current-theme
- #if [ "$RESULTOK" = "default" ];then
- # cp /etc/gtk/gtkrc.default /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "basic" ];then
- # cp /etc/gtk/gtkrc.basic /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "notif2" ];then
- # cp /etc/gtk/gtkrc.notif2 /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "quiet" ];then
- # cp /etc/gtk/gtkrc.quiet /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "forest" ];then
- # cp /etc/gtk/gtkrc.forest /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "peach" ];then
- # cp /etc/gtk/gtkrc.peach /etc/gtk/gtkrc
- #fi
- #if [ "$RESULTOK" = "weary" ];then
- # cp /etc/gtk/gtkrc.weary /etc/gtk/gtkrc
- #fi
- cp /etc/gtk/gtkrc.$RESULTOK /etc/gtk/gtkrc
-
-
- #0.9.6 added for gtk2...
- sync
- cat /etc/gtk/gtkrc | sed -e 's/# font_name/ font_name/g' > /etc/gtk-2.0/gtkrc
-