Changing GTK themes in OSx
If you, like me, usually find yourself using a lot of open source apps in your OSx system and that applications tend to be GTK based (like dia to draw schemes and diagrams or sylpheed as your MUA), you will see something like that when running that GTK-based application:
Pretty ugly, even more if you like all your applications having the same look. GTK already has some good-looking themes and there are even some themes that mimic the look of OSx itself (just take a look at the gnome-look project to find some.
The problem I found once I downloaded all the themes I would like to check was how could I change the GTK theme within OSX??.
In Gnome there is a tool that let you change every aspect of a Gnome theme, from the GTK theme to the iconset, backgrounds, etc. But obviously, I do not want to install Gnome, just only a way to change easily my default GTK theme.
The answer was right there, in the MacPorts collection:
snowball:~ wu$ port search gtk-theme gtk-theme-switch x11/gtk-theme-switch 2.0.4 command-line theme switcher for gtk2 snowball:~ wu$
A command-line tool... could it be better?
Installing it was easy:
sudo port -v install gtk-theme-switch
And, yes, it could be better!, you can use that tool to change the GTK theme from a console, you can use it to install .tgz compressed themes and it has an easy-and-quick GTK-based gui to do the job too. Amazing!
To use the graphical interface, you only have to call switch2 from a Terminal.app, to get something like:
There, you only have to select your favourite theme (if you do not have themes installed, try port search gnome-themes in a shell) and click apply to change the default theme to:
Well, as we are using OSx, it should be nice if our GTK apps look like the rest of the native applications, so just download the theme tarball, and use switch2 to install it, both from a shell or using the graphical interface.
Once you have your theme installed, you will be able to select it from the dropdown menu in the graphical interface, to use it:
Much much better, isn't it?