GTK configuration for non-gnome desktop user
March 17th, 2007 mysurface Posted in Misc, X11, fluxbox, gtk-theme-switch | Hits: 32535 |
There are a lots of people install and use other windows manager on top of gnome, instead of using metacity by default. Windows manager such as beryl, fluxbox, fvwm etc allows gtk applications to run on top of them with full capabilities. You can also run gtk applications under KDE where by default all KDE native apps are build using QT.
Let the case of fluxbox user, in order to allow the gtk apps appear with themes, icons settings, the convenient way is to run a gnome settings daemon.
gnome-settings-daemon
After that, you can switch the theme by gnome-theme-manager, or something light gtk-theme-switch or gtk-chtheme.
But, what if I don’t have gnome-settings-daemon? Or I just don’t want to load it up because it is heavy?
You can still uses the gtk-theme-switch for switching the theme for most of the windows manager (Fluxbox 1.0rc2 works for sure.) But, it is missing something… The theme switcher is just for you to switch the themes, but it doesn’t take care of the icons theme and also the size of the icons on toolbar, menu etc.
Recently I find out a way to make an overlay settings on all gtk 2.0 apps without needed to run gnome-settings-daemon. When you uses the theme switch or something else to switch the gtk theme, it will generate a configuration file under your home directory, ~/.gtkrc-2.0.
~/.gtkrc-2.0
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/home/mysurface/.themes/Murrina-Olive/gtk-2.0/gtkrc"
include "/home/mysurface/.gtkrc-2.0.mine"
# -- THEME AUTO-WRITTEN DO NOT EDIT
.gtkrc-2.0 is auto generated by the theme switch, so don’t write anything on this file although it works. Your addition settings will be disappear when you switch your theme again. Look at the second include, the file .gtkrc-2.0.mine is actually not exist. So create it and write your additional settings in it.
What are those additional settings?
.gtkrc-2.0.mine
gtk-icon-theme-name="Tango"
gtk-icon-sizes="gtk-menu=16,16:\
gtk-button=16,16:\
gtk-small-toolbar=16,16:\
gtk-large-toolbar=16,16:\
gtk-dnd=16,16:\
gtk-dialog=16,16"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
I want my icon theme set, I want my icon appear small. Most of the people stop at setting gtk-icon-sizes, where I find it not enough for me, the icon appear on toolbar is larger compare to when I run gnome-settings-daemon. gtk-toolbar-style is the one I am searching for, I am satisfied now.
You can do more tweaking, check out this, share us some examples, if you find any interesting stuff which is not covers in this post.
[tags]windows manager, small icon, small toolbar icon, gtk themes, gtk 2.0[/tags]
Live Chat!







November 13th, 2008 at 12:27 am
Thanks. Very helpful.
Bizarrely, while experimenting (because of the lack of end-user documentation on this stuff) to reduce the size of a tray icon, gtk-large-toolbar didn’t work but “gtk-dnd=48,48″ did, reducing the tray icon from 32×32 to 22×22.
That solution doesn’t make sense. The 48,48 is an icon size and dnd denotes drag-and-drop! I had already spent too long on this so have not yet tried changing the 48,48.
This on ubuntu 8.04.1 with default gtk packages, Nautilus 2.22.5.1 and transmission 1.40b1 tray icon.
Best
Charles
April 4th, 2010 at 11:54 am
Hi
Thanks for your tuto.
I added in gtkrc-2.0.mine:
gtk-can-change-accels=1 # to change shortcuts in menu
gtk-menu-bar-popup-delay=0 # let’s make
gtk-menu-popdown-delay=0 # the menus
gtk-menu-popup-delay=0 # speedier!!! No more sluggish!
cheers
TheTilde