Change the menu background colour in Gnome

Long have I wondered this and, as usual, the answer is pretty simple.

To gain finer control over the colours used by Gnome for the menu and panels etc:

  1. Create a file in /home/username/.gnome2 called .gtkrc-2.0
  2. Define the “style” block that you’d like to apply to a GTK element – e.g.:

    style "menu_color"
    {
    fg[NORMAL] = "#000000"
    fg[SELECTED] = "#CCCCCC"
    fg[ACTIVE] = "#CCCCCC"
    fg[PRELIGHT] = "#CCCCCC"
    fg[INSENSITIVE] = "#7099CC"
    bg[NORMAL] = "#7099CC"
    bg[SELECTED] = "#7099CC"
    bg[ACTIVE] = "#7099CC"
    bg[PRELIGHT] = "#7099CC"
    }
  3. Then apply it to the element in question using one of the following statements:

    widget "*PanelWidget*" style "my_color"
    widget "*PanelApplet*" style "my_color"
    widget_class "*MenuItem*" style "my_color"
    widget_class "*ToolItem*" style "my_color"
    widget_class "*SeparatorMenuitem*" style "my_color"
    widget_class "*SeparatorToolitem*" style "my_color"
    widget_class "*ImageMenuitem*" style "my_color"
    widget_class "*RadioMenuitem*" style "my_color"
    widget_class "*CheckMenuitem*" style "my_color"
    widget_class "*TearoffMenuitem*" style "my_color"
    widget_class "*Menu*" style "menu_color"
  4. Type killall gnome-panel in a terminal and you’re good to go.

This link has more discussion and detail.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s