Page 1 of 1

gtkColor

Posted: Sun Sep 13, 2015 8:42 pm
by dkeg
A script I've been thinking about for awhile. I generally update a few colors on my current gtk theme to match my current xcolors, then save as new. Soon, if you're like me, your .themes/ gets crowded.
The goal was to only have a base gtk theme, which could be automatically updated to use your current xcolors. So today was the day to get it done, aptly named gtkColor. I did leverage some logic I used in my 2bwm border color script.
It requires a $HOME/tmp directory and some sort of xrdb color scraper.
When you change you xcolors, run this. It will update all color values in your base gtk theme. To assist, I've uploaded a base gtk theme also.
Check it out!
https://github.com/dkeg/inspin/blob/master/gtkColor

Re: gtkColor

Posted: Sun Sep 13, 2015 10:04 pm
by Dr_Chroot
I actually haven't played with GTK much so this should be a learning curve :D Thanks, dkeg!

Re: gtkColor

Posted: Mon Sep 14, 2015 2:20 am
by dkeg
Thanks DC. You want to keep your schemes consistent, no?

Updated to take current theme as set in your $HOME/.gtkrc. I'd still recommend to just use the 'base' gtk theme. Its tested and a nice generic name/theme. Enjoy.

I should just rename the fucker. So in the end its always just 'base'.

Re: gtkColor

Posted: Mon Sep 14, 2015 4:32 am
by machinebacon
Ah here it is, thanks for sharing, I will test this tonight together with colr and link to xcolors/xcolor_code. Very excited :D

Re: gtkColor

Posted: Mon Sep 14, 2015 9:40 am
by wuxmedia
What a smart idea, might be able to not need a tmp file, sometimes need to quote a var to have it print out exactly, if that's what it was.
anyway i'm no script master, if it works - it works :)

Re: gtkColor

Posted: Mon Sep 14, 2015 10:50 am
by dkeg
Cool MB, let me know how it goes

Wux, yeah, I don't know. The string was difficult to work with. This was the most elegant solution I would come up with.
Edit: *the only solution*. To add though, I am not aware of anything else out there similar.

Re: gtkColor

Posted: Mon Sep 14, 2015 1:38 pm
by rhowaldt
i think when you try to get out of tmp-files you get into shit with here-documents, and i find those so strange and illogical that i kinda prefer a tmp-file. indeed, if it works, it works.

Re: gtkColor

Posted: Mon Sep 14, 2015 2:00 pm
by wuxmedia
yeah where is Raffles and the DR :^S

Re: gtkColor

Posted: Sun Sep 20, 2015 1:40 am
by dkeg
updated version adds a check for ~/tmp, creates if ! exists, adds a satisfying output.

Re: gtkColor

Posted: Sat Jun 11, 2016 7:58 pm
by dkeg
Updated: scrapes xrdb directly, sets current gtk theme to match xcolor scheme. Works only with gtk2