# GTK theme plugins?

**URL:** <https://www.ruby-forum.com/t/gtk-theme-plugins/208306>\
**Category:** Ruby-Gnome 2\
**Created:** [June 14, 2011, 9:06pm UTC](https://www.ruby-forum.com/t/gtk-theme-plugins/208306 "2011-06-14T21:06:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 14, 2011, 9:06pm UTC](https://www.ruby-forum.com/t/gtk-theme-plugins/208306/1 "2011-06-14T21:06:47Z")

</div>

I’ve recently started investigating the gtk2 gem with Ruby 1.9.2 on  
Windows using the RubyInstaller build recipes. It was a pleasant install  
experience and I think it’s clever that you’ve bundled the dependencies  
under vendor/local subdirs.

A big _thanks_ to all of you involved with delivering this capability  
and also making it available as a mingw binary gem!

With GTK+ apps (eg - Sylpheed) one can usually change the theme via  
tweaks to etc/gtk-2.0/gtkrc, adding a DLL to lib/gtk-2.0/2.10.0/engines,  
and adding a theme directory to share/themes.

From an earlier discussion with Kou, I understand there’s not currently  
a way to set the theme from a Ruby script by doing something like  
calling a method after `require 'gtk2'` but before `Gtk.main`. I also  
understand there’s not currently a way to use optional “theme plugin  
gems” (eg - gtk2-glossy) that you could then `require` and use from a  
Ruby script.

I personally prefer the idea of theme plugin gems, but don’t yet have  
enough GTK+ experience to know what the key technical hurdles are. For  
example, is it even possible to logically meld the optional theme gem’s  
theme engine DLL and share/themes info with the gtk2 gem’s vendor/local  
structure by orchestrating things through the gtk2 gem’s gtk2.so  
library? If not, what other options exist?

Is there any interest in finding a solution to setting GTK+ themes from  
Ruby?

Jon
