gtkColor
Forum rules
Your own work only.
Your own work only.
gtkColor
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
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
Work hard; Complain less
- Dr_Chroot
- Alfalfa
- Posts: 1100
- Joined: Mon Jun 09, 2014 9:49 pm
- Location: among the sagebrush
- Contact:
Re: gtkColor
I actually haven't played with GTK much so this should be a learning curve :D Thanks, dkeg!
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
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
Re: gtkColor
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'.
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'.
Work hard; Complain less
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: gtkColor
Ah here it is, thanks for sharing, I will test this tonight together with colr and link to xcolors/xcolor_code. Very excited :D
..gnutella..
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: gtkColor
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 :)
anyway i'm no script master, if it works - it works :)
Re: gtkColor
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.
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.
Work hard; Complain less
Re: gtkColor
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.
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.
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: gtkColor
yeah where is Raffles and the DR :^S
Re: gtkColor
updated version adds a check for ~/tmp, creates if ! exists, adds a satisfying output.
Work hard; Complain less
Re: gtkColor
Updated: scrapes xrdb directly, sets current gtk theme to match xcolor scheme. Works only with gtk2
Work hard; Complain less