Submitted scripts and programs
Forum rules
Your own work only.
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » 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
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"
-
Attachments
-
..gnutella..
-
Dr_Chroot
- Alfalfa
- Posts: 1100
- Joined: Mon Jun 09, 2014 9:49 pm
- Location: among the sagebrush
-
Contact:
Unread post
by Dr_Chroot » Fri May 15, 2015 7:55 pm
Works like a charm, MB 8)
Fight internet censorship.
EFF | Tor Project | Bitcoin
"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden
-
machinebacon
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
-
Contact:
Unread post
by machinebacon » Fri May 15, 2015 7:57 pm
^ made a little add-it (edit), please check :)
..gnutella..
-
simgin
- Meme Fodder
- Posts: 1167
- Joined: Sun Jan 06, 2013 12:07 am
- Location: Bradford-on-Avon, UK
Unread post
by simgin » Sat May 16, 2015 6:02 pm
Brilliant Julius :D
Someone told me that I am delusional, I almost fell off my unicorn.