Page 1 of 1

dkeger2

Posted: Fri May 15, 2015 7:36 pm
by machinebacon
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

Code: Select all

#include </home/user/.Xresources_colors>
Of course you can change both this location as also the location of your color codes -- easy task.

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
By the way, (edit) it now supports the option for scheme name directly, for example "dkeger blackbog"

Re: dkeger2

Posted: Fri May 15, 2015 7:55 pm
by Dr_Chroot
Works like a charm, MB 8)

Re: dkeger2

Posted: Fri May 15, 2015 7:57 pm
by machinebacon
^ made a little add-it (edit), please check :)

Re: dkeger2

Posted: Sat May 16, 2015 6:02 pm
by simgin
Brilliant Julius :D