xcolormaker

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:

xcolormaker

Unread post by machinebacon » Tue Jul 01, 2014 1:00 pm

This is just a bunch of tools in a chain. Requires following structure:

/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!"
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: xcolormaker

Unread post by dkeg » Tue Jul 01, 2014 1:21 pm

Haha, nice MB!

Work hard; Complain less

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: xcolormaker

Unread post by GekkoP » Tue Jul 01, 2014 1:27 pm

Easier than before. Wow.

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: xcolormaker

Unread post by bones » Tue Jul 01, 2014 1:29 pm

Damn, cool tool, bacon!

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: xcolormaker

Unread post by rhowaldt » Tue Jul 01, 2014 1:57 pm

Jules just made a valid script.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply