Customizing GTK Apps
If you are used to GNOME, you might want to learn how to change your theme without using the GNOME Theme Manager, as it relies on a constantly running process called gnome-settings-daemon which wastes resources. You can theme GTK apps manually without this process, however.
Contents |
Manually
Initial Setup
First, create a file called ".gtkrc-2.0" in your home folder, and put this line in it:
include '/home/<username>/.gtkrc.mine'
Next, create ".gtkrc-1.2-gnome2" and add the same line. Now create ".gtkrc.mine".
GTK Themes
To apply a theme, add this line to .gtkrc.mine:
include '/usr/share/themes/Clearlooks/gtk-2.0/gtkrc'
replacing the example path with the path to the theme you want to use (probably in /home/<username>/.themes).
For GTK3 apps
create the file ~/.config/gtk-3.0/settings.ini with contents:
[Settings]
gtk-icon-theme-name = <icon-theme-name>
gtk-theme-name = <gtk-3-theme-name>
Icon Themes
To apply an icon theme, add this line to '.gtkrc.mine':
gtk-icon-theme-name = "Tango"
The name of the icon theme can be found in the index.theme file in the theme folder (probably in ~/.icons).
Fonts
To change the fonts of GTK apps, add this to your '.gtkrc.mine' file:
style "schrift"
{
font_name = "DejaVu Sans 10"
}
widget_class "*" style "schrift"
gtk-font-name = "DejaVu Sans 10"
Toolbars
To change the look of certain apps' toolbars (like gedit), add one of the following lines to your '.gtkrc.mine' file:
gtk-toolbar-style = GTK_TOOLBAR_ICONS #Only icons gtk-toolbar-style = GTK_TOOLBAR_TEXT #Only text gtk-toolbar-style = GTK_TOOLBAR_BOTH #Both icons and text gtk-toolbar-style = GTK_TOOLBAR_BOTH_HORIZ #Icons and text next to the icons
You can also change the size of the icons:
gtk-toolbar-icon-size = 16,16
Automatically
There a few apps that you can use to change your theme without invoking gnome-settings-daemon:
Example
The following is an example '.gtkrc.mine' file:
##################
# GTK #
##################
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"
##################
# FONTS #
##################
style "schrift"
{
font_name = "Myriad Web 9"
}
widget_class "*" style "schrift"
gtk-font-name = "Myriad Web 9"
##################
# ICONS #
##################
gtk-icon-theme-name = "Crashbit"
##################
# TOOLBARS #
##################
gtk-toolbar-style = GTK_TOOLBAR_ICONS