Changing Side Pane Color in Caja (GTK2)

I just discovered Backgrounds and Emblems in Caja, and it's awesome! However, when I drag a new color or pattern into the Side Pane (rather than the main part of the Caja window), it is rejected.

It seems you can only change the background pattern/color of the main Caja window, not the side pane. Is there a way to change the side pane? It would be nice to get a darker side pane than the main window, like the file manager in Linux Mint (dark theme) has.

Thoughts?

1 Like

You could try another tool.

Gnome-color-chooser

http://packages.ubuntu.com/xenial/gnome-color-chooser

I'm with you on wanting a darker side pane. :slight_smile:

This is actually dependent by theme (the default being Ambiant-MATE). It wasn't until now when I've found the solution! :smile:

(Thanks to looking at how Linux Mint's mint-y theme does it ;))


To set this regardless of theme:

  • Press ALT+F2 and open Pluma as root to this file:

      gksudo pluma /etc/gtk-2.0/gtkrc
    
  • Copy and paste the code below.

  • Re-apply the theme from the Appearance dialog.

This will apply to all themes system-wide.

It can be set on a per-theme basis too...
  • Open Pluma as root pointing to your theme's gtk-2.0/apps/caja.rc.

    E.g. For Ambiant-MATE, you can press ALT+F2 then type:

      gksudo pluma /usr/share/themes/Ambiant-MATE/gtk-2.0/apps/caja.rc
    

This is the styling code that does the magic:

style "dark-sidebar" {
  GtkTreeView::odd_row_color = "#454545"
  GtkTreeView::even_row_color = "#454545"

  base[NORMAL] = "#454545"
  base[INSENSITIVE] = "#454545"

  text[NORMAL] = "#C3C3C3"
  text[ACTIVE] = "#000"
  text[SELECTED] = @selected_fg_color
}

widget_class "*CajaSidePane*" style "dark-sidebar"

Once saved, re-apply your theme from Appearance.


You can also change the colours too:

  • #454545 = Darker gray for background. (Like Linux Mint)
  • #C3C3C3 = Light gray for text.
  • #000 = Black.
  • @selected_fg_color = Theme's default foreground colour, usually white.

Ubuntu MATE has a colour tool pre-installed that you can choose for picking the colour, as these are hex colour codes.


End result:


In Ubuntu MATE 16.10, a dimmer side bar colour will be used by default.

Here's an early screenshot
5 Likes

Unbelievably awesome!!! Thank you!!!:joy:

1 Like

I noticed that when I log on, the sidebar was back to normal :frowning: Seems to be a bug when logging in ignores these changes (it worked again by re-applying the theme).

If that happens to you too, save to /etc/gtk-2.0/gtkrc instead. I’ve updated the instructions. :slight_smile:

1 Like

Excellent! Thank you very much!

1 Like

Thank you very much! I noticed it had gone back too!

1 Like

A solution for Ubuntu Mate 17.04?

Any way to make it so the main panel and side panel use alpha? Or would that require the whole window having alpha, which GTK3 might no support?

Setting an alpha colour is rgba(255, 255, 255, 1) where 1 is a decimal between 0 and 1.

Presumably you'd set that on the background or background-color property but I haven't investigated the GTK3 equivalent.