Changing theme in gtk3

It looks like Debian Jessie now builds some packages against gtk3. In particular scite appears to have fallen victim to this. With this change comes the moronic UI that gnome developers have festered upon users with a clue.

The particular UI element that caught my attention was tab bar (notebook in gtk parlance). Compare the distinctiveness of the active tab in gtk2:

And gtk3:

How about firefox?

Or mrxvt?

In gtk3, the only UI element signifying the active tab is the absence of the border between the active tab and the bottom of the notebook. If you are using gtk3, try this experiment: open 4-5 tabs in some program using gtk3, look at the first tab and switch active tabs via the keyboard. I don't know about you but I cannot see with my peripheral vision which tab is selected. I have to stare at each tab in order to figure that out.

And this is how I found out that I do not typically look at the tabs themselves. When I switch tabs I look at the content and I use peripheral vision to roughly gauge my position in the document list. When I am close I pay more attention to the content until I get to the document I want. gtk3 destroys this workflow because my peripheral vision no longer is able to distinguish between me being one tab off target and ten.

Surprisingly (or should I be, really?) the process of changing the gtk3 theme is convoluted at best. Suggestions I found included using gtk-chtheme and lxappearance. Well, both of those programs are linked against gtk2, and their web pages specifically say they are made to change gtk2 themes.

Then I came across gtk-theme-config, which was linked against gtk3 and with the following description:

 Change some basic elements of a GTK+ theme easily (both GTK2 and GTK3)
 with a simple interface.

I kid you not, this is what this program looks like:

I have not even seen any of those colors (other than gray) on my system anywhere so I have no idea what they actually apply to.

This is when I started digging for anything related to gtk3 and themes, and came across gtk3-engines-oxygen package. In its readme are instructions for changing the theme that did finally work:

V. example configuration (aka: how to select the oxygen-gtk style for gtk3 applications)
to have oxygen-gtk style selected for your gtk3 applications, you need to edit the file


so that it contains:
----- begin of file ------
  gtk-theme-name = oxygen-gtk
----- end of file -----

Also, it is recommanded that the $HOME/.config/gtk-3.0/gtk.css file, if present, is kept empty.

That last bit is interesting. I take it that with enough time sunk I can turn gtk3 UI into something that looks great, maybe kind of like gtk2, via css. All it will take is a few days of my life. When do I start?

And this is what the oxygen theme looks:

Now only three tabs fit the tab bar so the victory is bittersweet. But, I have a patch for that (tm) and I can patch the theme as well.

Armed with this success I set out to look for additional themes. The only other package which has "gtk", "theme" and "3" in its name was gtk3-engines-xfce. This looked promising except it appeared to be completely broken. When these themes were enabled, scite rendered as if there was no theme at all:

And I see these messages in the terminal:

(scite:18507): Gtk-WARNING **: Theme parsing error: gtk.css:60:18: Not using units is deprecated. Assuming 'px'.

(scite:18507): Gtk-WARNING **: Theme parsing error: gtk.css:60:20: Not using units is deprecated. Assuming 'px'.

These really should only affect those specific declarations, not render the entire theme broken. But this is gtk3, who knows?

Hmm, this theme fits a lot of tabs into the tab bar.

Finally I found Clearlooks-Phenix which is a clearlooks port to gtk3. Not sure how I missed it earlier but better late than never. This theme is a little too much accented for my taste but it is worlds above the default gtk3 theme. We have a winner!

There is one final caveat, and that is how to know the correct theme name to write in configuration. I do this by consulting dpkg:

dpkg -L clearlooks-phenix-theme

... and looking for directories under /usr/share/themes.

While reading clearlooks-phenix manual I found a GUI tool to change themes: gnome-tweak-tool. Now that I know, it should have been pretty obvious to make the leap from "gtk 3 change theme" to "gnome tweak tool"... not. And the "gnome" part of the name does what you think it does - brings in chunks of gnome as dependencies.