/home/$USER/xcolors/xcolor_code/
/home/$USER/xcolors/fb_colors/
/home/$USER/wallpapers/ (or some place you store your images, please edit accordingly)
/usr/local/bin/fbgen (executable)
/usr/local/bin/dkeger (executable)
It first lets you choose a wallpaper to extract colors from, then asks for a theme name, then generates the xcolor_code for Xresources, the fbcolors, and finally allows the user to set them active
Very basic, I'm just bored of typing the same old commands every time ;)
Code: Select all
#!/bin/bash
. /usr/share/doc/dialog/examples/setup-vars
. /usr/share/doc/dialog/examples/setup-tempfile
wallpath=`$DIALOG --stdout --title "Use TAB, Space and Enter to select a wallpaper" "$@" --fselect $HOME/wallpapers/ 14 48`
$DIALOG --title "Enter theme name" --clear "$@" \
--inputbox "Color scheme will be filed under this name:" 0 0 2> $tempfile
name=`cat $tempfile`
clear
echo "Generating color table, please wait..."
paletterx $wallpath >> ~/xcolors/xcolor_code/$name
nano ~/xcolors/xcolor_code/$name
fbgen ~/xcolors/xcolor_code/$name >> ~/xcolors/fb_colors/$name
nano ~/xcolors/fb_colors/$name
chmod a+x ~/xcolors/fb_colors/$name
fbcolors
dkeger
clear
echo "Theme set, open a new terminal!"