Page 1 of 1

openbox themes with gtk colours

Posted: Tue Dec 09, 2008 12:21 am
by nitrofurano
as feature, how easy is to OpenBox development implement colours like gtk:bg[SELECTED], gtk:bg[NORMAL], gtk:fg[SELECTED] and gtk:fg[NORMAL] in the themerc files, beyond usual hexcolours like #3A6476 or xorg colours like indianred?
This feature would be useful for changing window decoration colours from programs like gnome-color-chooser, for example, without having to have tons of openbox themes installed at ~/.themes

The idea is having the OpenBox themerc files looking like:
menu.title.bg.color: gtk:bg[SELECTED]
menu.bullet.image.color: gtk:bg[SELECTED]
window.active.client.color: gtk:bg[SELECTED]
menu.items.active.bg.color: gtk:bg[SELECTED]
window.active.grip.bg.color: gtk:bg[SELECTED]
window.active.title.bg.color: gtk:bg[SELECTED]

and so on...

Re: openbox themes with gtk colours

Posted: Sat Mar 31, 2012 1:28 pm
by wojtek
Bump

did someone come up with a solution for this ?
maybe the author didn't put this across clearly, but I think
the main idea is detecting the colour scheme already existing
in gtk theme and use it for creating colours for openbox's theme.

Judging by what is written on openbox's wiki: http://openbox.org/wiki/Help:Themes#Colors
it's impossible to detect these colours directly (yet)
but maybe a work-around or some other tool ?

No, downloading a theme which provides support for both gtk2/3 and openbox
isn't a solution since many people (including me) like to have custom colours
EDIT: If I saw a theme which resembles my custom theme (http://imageshack.us/photo/my-images/80 ... rker2.png/) for gnome2 (RIP) and has all gtk2,3, openbox support, such complications wouldn't be necessary.

Re: openbox themes with gtk colours

Posted: Fri Apr 13, 2012 5:56 am
by technosaurus
this is a chunk from my jwm tools package

Code: Select all

while read LINE ; do #go through trayfile line by line
   case $LINE in
      include*/usr/share/themes*)GTKRC=${LINE#include };GTKRC=${GTKRC//\"/};break;;
   esac
done < ${HOME}/.gtkrc-2.0

while read LINE || [ "$LINE" ]; do #go through gtkrc file line by line
   case $LINE in
      *bg?NORMAL*)MENU_BG=${LINE##* };;
      *bg?SELECTED*)ACTIVE_BG=${LINE##* };;
      *fg?NORMAL*)FOREGROUND=${LINE##* };;
      *bg?ACTIVE*)PAGER_BG=${LINE##* };;
      *fg?SELECTED*)FG_SELECTED=${LINE##* };;
   esac
done < $GTKRC
should be adaptable?

Re: openbox themes with gtk colours

Posted: Fri Apr 13, 2012 9:26 am
by wojtek
technosaurus wrote:should be adaptable?
doubt that. themerc from sample openbox-3 Theme looks a bit different, there are some with bunch of colour configs.

When it comes to me, I got used to http://gnome-look.org/content/show.php/ ... ent=146674 as a window border theme and some other theme as a widget theme.
I'm not feeling like tinkering with it, 'cause LXDE is growing in popularity and maybe someone will at last create a nice theme with support for openbox