Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ## openbox windows manager terminal theme changer - v 0.1 ##
- ## stu ##
- CTHEME="`awk -F"[<,>]" '/<theme/ { getline; print $3 }' $HOME/.config/openbox/rc.xml`"
- DIR="/usr/share/themes"
- PS3='Option (exit with q)? :: '
- clear
- echo ":: Current Openbox theme > $CTHEME"
- select THEME in `ls -d $DIR/*/openbox-3 | rev | cut -d '/' -f2 | rev `; do
- if [[ "$THEME" = "Quit" ]]; then
- echo "Goodbye...." && exit
- fi
- if [ ! -n "$THEME" ]; then
- # Alloud exit with "q" at the prompt.
- if [[ "$REPLY" = "q" ]]; then
- exit
- else
- echo "Not a theme - please select again...."
- fi
- else
- echo "Selected and applying Openbox theme > $THEME"
- OLDTHEME=`awk -F"[<,>]" '/<theme/ { getline; print $3 }' $HOME/.config/openbox/rc.xml`
- sed -i "s:"$OLDTHEME":"$THEME":g" /root/.config/openbox/rc.xml
- openbox --reconfigure
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement