Before, one could configure certain options in Gnome 2.x through the ~/.gtkrc-2.0 file. With Gnome 3, one would assume that ~/.gtkrc-3.0 works but it doesn't.
- 6,336
- 14
- 40
- 70
- 5,951
- 4
- 35
- 44
-
which OS version you are using – Ghost Answer Apr 25 '12 at 07:32
-
I am using Ubuntu 12.04 amd64 – Severo Raz Apr 30 '12 at 15:54
1 Answers
gtk 3.0 / Gnome 3 settings can be overwritten using ~/.config/gtk-3.0/, with files gtk.css and settings.ini. They do not exist initially so you have to create the directory and files manually. If you create settings.ini add at least a line containing [Settings] in it, otherwise apps will complain about it missing.
See /usr/share/theme/[theme_name]/gtk-3.0/*.css files for hints of what you can change.
Most likely you will want to use gtk.css to override visual settings from the desktop theme with your own preferences. I usually don't edit gtk.css itself but rather append a line saying @import url("gtk-mine.css"); and put my stuff in gtk-mine.css. This way, in case someone ever overwrites that file, I only lose the @import line, not all my personal rules.
Here's a short example of how to override some scrollbar attributes:
~/.config/gtk-3.0/gtk-css:
@import url("gtk-mine.css");
~/.config/gtk-3.0/gtk-mine.css:
* {
-GtkRange-slider-width: 18;
-GtkScrollbar-has-forward-stepper: 0;
-GtkScrollbar-has-backward-stepper: 0;
-GtkScrollbar-has-secondary-forward-stepper: 0;
-GtkScrollbar-has-secondary-backward-stepper: 0;
-GtkScrollbar-min-slider-length: 30;
}
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
border-radius: 4;
}
- 66
- 1
- 2
-
Seeing your post, I think its great that Gnome 3 uses CSS for style. Thanks for your answer! I initially wondered about this because I wanted to change icon sizes, but I guess there is some option somewhere on the CSS files for doing that. – Severo Raz Jul 09 '12 at 01:52
-
1