dkeger2
Posted: Fri May 15, 2015 7:36 pm
So this is the newkeger :) Little change: we create a separate color file that is sourced by .Xresources -- in this case, colors go to ~/.Xresources_colors and you should have this as last line in your ~/.Xresources
Of course you can change both this location as also the location of your color codes -- easy task.
This is the new script:
By the way, (edit) it now supports the option for scheme name directly, for example "dkeger blackbog"
Code: Select all
#include </home/user/.Xresources_colors>
This is the new script:
Code: Select all
#!/bin/bash
XRES=~/.Xresources_colors
COLORS=~/xcolors/xcolor_code
term_restart(){
xrdb -merge ~/.Xresources
/bin/bash -c x-terminal-emulator &
}
menu(){
array=( $(ls "$COLORS") )
select opt in "${array[@]}"; do
echo "Copying $opt to $XRES"
cp $COLORS/$opt $XRES
echo $opt > ~/.xcolorselect
term_restart
break
done
}
[[ -z $1 ]] && menu && exit 0
if [ -e $COLORS/$1 ]; then
cp $COLORS/$1 $XRES
echo $1 > ~/.xcolorselect
term_restart
exit 0
fi