Fixing Openbox’s separator color

One small annoyance with Openbox that I found was that its separator color does not match up with how things are handled in most Gtk and Qt themes. The color of the separator is taken from the text color rather than from the disabled text color.

Fixing this is not hard if you do not mind recompiling Openbox. Like all tutorials here, this will assume you are using Ubuntu.

First, you need to get the build dependencies needed to make Openbox, as well as the Openbox source.

# apt-get build-dep openbox
apt-get source openbox

This will make an openbox-3.4.4 source folder with all the Ubuntu patches applied. Next, you need to save my source patch to a file called fix_separator.diff:

diff -Naur openbox-3.4.4/openbox/menuframe.c openbox-b-3.4.4/openbox/menuframe.c
--- openbox-3.4.4/openbox/menuframe.c 2007-07-30 21:32:46.000000000 +0800
+++ openbox-b-3.4.4/openbox/menuframe.c 2008-01-23 01:21:41.000000000 +0800
@@ -169,8 +169,13 @@
RrAppearanceCopy(ob_rr_theme->a_menu_bullet_selected);
}

- self->a_text_normal =
- RrAppearanceCopy(ob_rr_theme->a_menu_text_normal);
+ if (entry->type == OB_MENU_ENTRY_TYPE_SEPARATOR) {
+ self->a_text_normal =
+ RrAppearanceCopy(ob_rr_theme->a_menu_text_disabled);
+ } else {
+ self->a_text_normal =
+ RrAppearanceCopy(ob_rr_theme->a_menu_text_normal);
+ }
self->a_text_selected =
RrAppearanceCopy(ob_rr_theme->a_menu_text_selected);
self->a_text_disabled =

Now with this file in your working directory, at the same level as the openbox-3.4.4 subdirectory, run the following commands:

cd openbox-3.4.4
patch -p1 < ../fix_separator.diff
./configure
make
# cp openbox/.libs/openbox /usr/bin/openbox

After this, you will need to restart your Openbox session. The separator colors should now be fixed.

Related Posts

Related posts brought to you by Yet Another Related Posts Plugin.


About this entry