SwitchT is my script name for Switch Theme. I'm going to put this out there for some feedback. I've been working on a theme-pack containing:
4 Dark and colorful (no gray) Gtk-2/3 themes, including my own "neo-console" theme, with 2 color-complimentary JWM themes
1 set of multi-color ROX-mime icons for dark backgrounds with a ROX 'globicons' file to associate them
1 X11/themes icon pack that contains two sets of mono-chrome icons for built-in applications and a limited number of other applications, and also some drive icons to be placed in usr/share/midi-icons (actually the icon collection is fairly diverse with some stock high-contrast color icons and my own manipulations)
An installation script to install the themes, backup the current JWM/GTK/ROX configuration, and backup the current config files from 6 built-in, user-configurable Fossapup applications to grep later
5 SwitchT Scripts -- 2 scripts to switch between two 'featured' themes and 1 script to switch back to the original user configuration (JWM/GTK/ROX/Applications/icons), and 2 User-Custom theme scripts, one to backup and one to restore whatever combination of elements is on the desktop at any given moment
The package is not quite ready for posting just yet, but I can say it installs and switches all themes rather smoothly, both on a fresh ram boot with no save, and also on a fully bloated persistent save. Still there are a few improvements to be made:
Currently I have not been able to successfully grep the color settings from /ROX-filer/options, and consequently my switch script copies the entire 'options' file between themes, which of course is a deal breaker, because one wants to keep their current options and only change the text colors per theme. All of my other grep and sed commands are working and smoothly keeping application colors congruent to the JWM/GTK themes. Thanks @MochiMoppel for introducing me to the idea a while back.
Icon-set development is ongoing as I need to create a set of 'puppy-standard' icons
JWM/Gtk-2 needs a restart for the theme change, but GTK-3 switches on the fly, while ROX needs an x-server restart. My present approach of switching config files probably necessitates restarting, but if that is the case, I would like to add sound lines in the script to restart x-server, because that automatically covers JWM and ROX simultaneously.
Before I start asking for takers to try it out, I thought I would just post the install script and a theme changer script to hopefully get some help. I barely know basic Linux command line, and I'm sure this is an overly primitive way to go about it, but I've learned a lot. If it remains a personal project, rather than something that is worthy of sharing, so be it. It works for me and my puppies!
Here is the Install script:
Code: Select all
#!/bin/sh
#Change working directory to theme-pack location
MYDIR=$(cd `dirname $0` && pwd)
cd $MYDIR
#Backup Current USER Application Config Files
cp /root/.Xdefaults /root/.Xdefaults-ORIG
cp /root/.config/geany/geany.conf /root/.config/geany/geany-ORIG.conf
cp /root/.config/galculator/galculator.conf /root/.config/galculator/galculator-ORIG.conf
cp /root/.config/gogglesmm/settings.rc /root/.config/gogglesmm/settings-ORIG.rc
cp /root/.config/hexchat/colors.conf /root/.config/hexchat/colors-ORIG.conf
cp /root/.notecase/notecase.ini /root/.notecase/notecase-ORIG.ini
#Backup Current JWM Theme
cp /root/.jwmrc-tray /root/.jwmrc-tray-USER-ORIG
cp /root/.jwm/jwm_colors /root/.jwm/themes/USER-ORIG_colors
cp /root/.jwm/jwmrc-theme /root/.jwm/themes/USER-ORIG_jwmrc
cp /root/.jwm/theme /root/.jwm/theme-USER-ORIG
#Backup Current Gtk Theme Name
cp /root/.config/gtk-3.0/settings.ini /root/.config/gtk-3.0/settings-ORIG.ini
cp /root/.gtkrc.mine/.gtkrc-ORIG
#Load Gtk Themes
cp -r $MYDIR/gtk/neo-console /usr/share/themes
cp -r $MYDIR/gtk/oomox-Pandora-Arc /usr/share/themes
cp -r $MYDIR/gtk/Cyanogen /usr/share/themes
cp -r $MYDIR/gtk/Punk-Gamma /usr/share/themes
cp $MYDIR/gtk/settings-OOMOX.ini /root/.config/gtk-3.0
cp $MYDIR/gtk/settings-NEO.ini /root/.config/gtk-3.0
cp $MYDIR/gtk/.gtkrc-OOMOX.mine /root/.gtkrc-OOMOX.mine
cp $MYDIR/gtk/.gtkrc-NEO.mine /root/.gtkrc-NEO.mine
cp $MYDIR/gtk/.gtkrc-2.0-OOMOX /root/.gtkrc-2.0-OOMOX
cp $MYDIR/gtk/.gtkrc-2.0-NEO /root/.gtkrc-2.0-NEO
#Load JWM Themes
cp $MYDIR/jwm/.jwmrc-tray-UniChrome /root/.jwmrc-tray-UniChrome
cp $MYDIR/jwm/neo-console-colors /root/.jwm/themes/neo-console-colors
cp $MYDIR/jwm/neo-console-jwmrc /root/.jwm/themes/neo-console-jwmrc
cp $MYDIR/jwm/neo-console-tray.png /root/.jwm/themes/neo-console-tray.png
cp $MYDIR/jwm/neo-console-window.png /root/.jwm/themes/neo-console-window.png
cp $MYDIR/jwm/oomox-Pandora-Arc-colors /root/.jwm/themes/oomox-Pandora-Arc-colors
cp $MYDIR/jwm/oomox-Pandora-Arc-jwmrc /root/.jwm/themes/oomox-Pandora-Arc-jwmrc
cp $MYDIR/jwm/oomox-Pandora-Arc-tray.png /root/.jwm/themes/oomox-Pandora-Arc-tray.png
cp $MYDIR/jwm/oomox-Pandora-Arc-window.png /root/.jwm/themes/oomox-Pandora-Arc-window.png
cp $MYDIR.jwm/theme-oomox-Pandora-Arc /root/.jwm/theme-oomox-Pandora-Arc
cp $MYDIR.jwm/theme-neo-console /root/.jwm/theme/theme-neo-console
#Load Themed Application Config Files
cp /$MYDIR/conf/.Xdefaults-NEO /root/.Xdefaults-NEO
cp /$MYDIR/conf/.Xdefaults-OOMOX /root/.Xdefaults-OOMOX
cp /$MYDIR/conf/geany-NEO.conf /root/.config/geany/geany-NEO.conf
cp /$MYDIR/conf/geany-OOMOX.conf /root/.config/geany/geany-OOMOX.conf
cp /$MYDIR/conf/galculator-NEO.conf /root/.config/galculator/galculator-NEO.conf
cp /$MYDIR/conf/galculator-OOMOX.conf /root/.config/galculator/galculator-OOMOX.conf
cp /$MYDIR/conf/hexchat/colors-NEO.conf /root/.config/hexchat/colors-NEO.conf
cp /$MYDIR/conf/hexchat/colors-OOMOX.conf /root/.config/hexchat/colors-OOMOX.conf
cp /$MYDIR/conf/goggles/settings-NEO.rc /root/.config/gogglesmm/settings-NEO.rc
cp /$MYDIR/conf/goggles/settings-OOMOX.rc /root/.config/gogglesmm/settings-OOMOX.rc
cp /$MYDIR/conf/notecase-NEO.ini /root/.notecase/notecase-NEO.ini
cp /$MYDIR/conf/notecase-OOMOX.ini /root/.notecase/notecase-OOMOX.ini
#Backup Current ROX MIME-Icons
cp -r /root/.config/rox.sourceforge.net/MIME-icons /root/.config/rox.sourceforge.net/MIME-icons-USER-ORIG
cp /root/.config/rox.sourceforge.net/ROX-Filer/globicons /root/.config/rox.sourceforge.net/ROX-Filer/globicons-USER-ORIG
#Load Themed ROX MIME-Icons
mkdir -p /root/.config/rox.sourceforge.net/MIME-icons
mkdir -p /root/.config/rox.sourceforge.net/MIME-icons-MULTI
cp $MYDIR/rox/MIME-icons-MULTI/*.* /root/.config/rox.sourceforge.net/MIME-icons-MULTI
cp $MYDIR/rox/globicons-MULTI /root/.config/rox.sourceforge.net/ROX-Filer/globicons-MULTI
#Backup USER ROX Options
cp /root/.config/rox.sourceforge.net/ROX-Filer/Options /root/.config/rox.sourceforge.net/ROX-Filer/Options-USER-ORIG
#Load Themed ROX Options
cp $MYDIR/rox/Options-NEO /root/.config/rox.sourceforge.net/ROX-Filer/Options-NEO
cp $MYDIR/rox/Options-OOMOX /root/.config/rox.sourceforge.net/ROX-Filer/Options-OOMOX
#Load Icons and Backgrounds
cp -r $MYDIR/X11lib/backgrounds /usr/share/
cp -r $MYDIR/X11lib/UniChrome /usr/local/lib/X11/themes
cp -r $MYDIR/X11lib/Moka2 /usr/local/lib/X11/themes
touch INSTALLATION-COMPLETE
And here is the SwitchT-OOMOX script:
Code: Select all
#!/bin/sh
#SwitchT-OOMOX Application Themes
#urxvt
grep urxvt.foreground:# /root/.Xdefaults-OOMOX | xargs -I {} sed -i "s/urxvt.foreground:#.*/{}"/ /root/.Xdefaults
grep urxvt.background:# /root/.Xdefaults-OOMOX | xargs -I {} sed -i "s/urxvt.background:#.*/{}"/ /root/.Xdefaults
grep urxvt.underlineColor:# /root/.Xdefaults-OOMOX | xargs -I {} sed -i "s/urxvt.underlineColor:#.*/{}"/ /root/.Xdefaults
grep urxvt.cursorColor:# /root/.Xdefaults-OOMOX | xargs -I {} sed -i "s/urxvt.cursorColor:#.*/{}"/ /root/.Xdefaults
#geany
grep color_scheme= /root/.config/geany/geany-OOMOX.conf | xargs -I {} sed -i "s/color_scheme=.*/{}"/ /root/.config/geany/geany.conf
#galculator
grep display_bkg_color= /root/.config/galculator/galculator-OOMOX.conf | xargs -I {} sed -i "s/display_bkg_color=.*/{}"/ /root/.config/galculator/galculator.conf
grep display_result_color= /root/.config/galculator/galculator-OOMOX.conf | xargs -I {} sed -i "s/display_result_color=.*/{}"/ /root/.config/galculator/galculator.conf
grep display_stack_color= /root/.config/galculator/galculator-OOMOX.conf | xargs -I {} sed -i "s/display_stack_color=.*/{}"/ /root/.config/galculator/galculator.conf
grep display_module_active_color= /root/.config/galculator/galculator-OOMOX.conf | xargs -I {} sed -i "s/display_module_active_color=.*/{}"/ /root/.config/galculator/galculator.conf
grep display_module_inactive_color= /root/.config/galculator/galculator-OOMOX.conf | xargs -I {} sed -i "s/display_module_inactive_color=.*/{}"/ /root/.config/galculator/galculator.conf
#hexchat
cp /root/.config/hexchat/colors-OOMOX.conf /root/.config/hexchat/colors.conf
#notecase
grep TextColor= /root/.notecase/notecase-OOMOX.ini | xargs -I {} sed -i "s/TextColor=.*/{}"/ /root/.notecase/notecase.ini
grep BackgroundColor= /root/.notecase/notecase-OOMOX.ini | xargs -I {} sed -i "s/BackgroundColor=.*/{}"/ /root/.notecase/notecase.ini
#gogglesmm [SETTINGS]
grep -w shadowcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/shadowcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w bordercolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/bordercolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w selmenubackcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/selmenubackcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w selbackcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/selbackcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w basecolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/basecolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w hilitecolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/hilitecolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w selforecolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/selforecolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w backcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/backcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w selmenutextcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/selmenutextcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w tipforecolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/tipforecolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w tipbackcolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/tipbackcolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep -w forecolor /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/forecolor=.*/{}"/ /root/.config/gogglesmm/settings.rc
#gogglesmm [colors]
grep tray\-back\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/tray-back-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep source\-selecttext\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/source-selecttext-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep source\-select\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/source-select-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep playtext\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/playtext-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep play\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/play-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep menu\-base\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/menu-base-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
grep row\-color /root/.config/gogglesmm/settings-OOMOX.rc | xargs -I {} sed -i "s/row-color=.*/{}"/ /root/.config/gogglesmm/settings.rc
#SwitchT-OOMOX Icons
cp /usr/local/lib/X11/themes/UniChrome/cayan-bright/*.* /usr/local/lib/X11/themes/UniChrome/console
cp /usr/local/lib/X11/themes/UniChrome/cayan-bright/midi/*.* /usr/share/midi-icons
cp /usr/local/lib/X11/themes/UniChrome/system-script/mono/cayan-bright/*.* /usr/local/lib/X11/themes/UniChrome/system-script/mono
#SwitchT-OOMOX JWM Theme
cp /root/.jwmrc-tray-UniChrome /root/.jwmrc-tray
cp /root/.jwm/themes/oomox-Pandora-Arc-colors /root/.jwm/jwm_colors
cp /root/.jwm/themes/oomox-Pandora-Arc-jwmrc /root/.jwm/jwmrc-theme
cp /root/.jwm/theme-oomox-Pandora-Arc /root/.jwm/theme
#SwitchT-OOMOX Gtk Theme
cp /root/.config/gtk-3.0/settings-OOMOX.ini /root/.config/gtk-3.0/settings.ini
cp /root/.gtkrc-OOMOX.mine /root/.gtkrc.mine
cp /root/.gtkrc-2.0-OOMOX /root/.gtkrc-2.0.mine
cp /root/.gtkrc-2.0-OOMOX /root/.gtkrc-2.0
#SwitchT-MULTI-colored ROX MIME-Icons
cp /root/.config/rox.sourceforge.net/MIME-icons-MULTI/*.* /root/.config/rox.sourceforge.net/MIME-icons
cp /root//.config/rox.sourceforge.net/ROX-Filer/globicons-MULTI /root/.config/rox.sourceforge.net/ROX-Filer/globicons
cp /root/.config/rox.sourceforge.net/MIME-icons-MULTI/inode_directory-OOMOX.png /root/.config/rox.sourceforge.net/MIME-icons/inode_directory.png
cp /root/.config/rox.sourceforge.net/MIME-icons-MULTI/inode_mount-point-OOMOX.png /root/.config/rox.sourceforge.net/MIME-icons/inode_mount-point.png
#SwitchT-ROX-options
cp /root/.config/rox.sourceforge.net/ROX-Filer/Options-OOMOX /root/.config/rox.sourceforge.net/ROX-Filer/Options
@JASpup @puddlemoon, here's where I'm at with this theme business.