10

Does anybody know how to enable the transparent window title bar in Ubuntu 14.04?

For previous versions (13.10 and 13.04) you can use this method, but it doesn’t work any more in 14.04.

I'm not referring to the top-panel in Ubuntu - I'm referring to the title-bar of the window.

2
  • 4
    14.04 is not using the metacity theme engine by default anymore, so those dconf setting won't have any effect. There's a new theme system based on gtk-css, but I don't know enough about it yet to say how to enable the effect that you want. For more info, see Theming
    – chaskes
    Apr 2, 2014 at 14:39
  • 14.04 needs at least a mouse with 3 keys and 1 wheel - you could take a logitech mouse with some more keys. and about creating transparency you could follow this link - google.de/… Jun 5, 2014 at 3:49

3 Answers 3

3

This is a partial solution, as I couldn't figure out why it doesn't work for active window.

As mentioned by chaskes, decoration transparency now is defined by themes using CSS (property or external background image).

Tested with Ambiance theme:

  • modified

    /usr/share/themes/Ambiance/gtk-3.0/apps/unity.css
    
  • by commenting background-image of UnityDecoration.top and UnityDecoration.top:backdrop leaving background-color: transparent;

    UnityDecoration.top {
        ...
        background-color: transparent;
        ...
        /*
        background-image: -gtk-gradient (linear, left top, left bottom,
                                         from (shade (@dark_bg_color, 1.5)),
                                         to (shade (@dark_bg_color, 1.04)));
        */
        ...
    }
    
    UnityDecoration.top:backdrop {
        ...
        background-color: transparent;
        ...
        /*
        background-image: -gtk-gradient (linear, left top, left bottom,
                                         from (shade (#474642, 0.92)),
                                         to (@dark_bg_color));
        */
    }
    

enter image description here

2
  • 1
    Thank you, this got me to the right place to set rgba colors for the theme I was using - i.stack.imgur.com/HsTSP.png
    – Mateo
    Oct 25, 2015 at 0:51
  • 1
    @Sneetsher: To fix the active window, you just need to make a few more changes: In the UnityDecoration.top section, comment out the 'color:' line, and add 'background-image: none;' to replace the image line you commented out.
    – 3vi1
    Mar 18, 2016 at 12:58
0

WARNING: This has undesirable side-effects, so back up the files you modify in case you can't live with the side-effects.

Do what @Sneetsher did.

Then also comment out all background-image sections in /usr/share/themes/Ambiance/gtk-3.0/apps/gnome-panel.css

Now open /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css. Your lines 1926 to 1960 (hopefully) read as follows:

/* primary-toolbar */
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar,
.menubar.toolbar,
.header-bar {
    -GtkWidget-window-dragging: true;

    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 0.96)),
                                     to (shade (@dark_bg_color, 1.4)));
    border-bottom-color: shade (@dark_bg_color, 1.1);
    border-top-color: shade (@dark_bg_color, 1.09);
    border-style: solid;
    border-width: 1px 0 1px 0;

    color: @dark_fg_color;
    text-shadow: 0 -1px shade (@dark_bg_color, 0.7);

    box-shadow: inset 0 1px shade (@dark_bg_color, 0.94);
}

.primary-toolbar .toolbar:backdrop,
.primary-toolbar.toolbar:backdrop,
.menubar.toolbar .toolbar:backdrop,
.menubar.toolbar.toolbar:backdrop,
.header-bar:backdrop {
    background-image: none;
    background-color: @dark_bg_color;
    box-shadow: none;
    border-top-color: @dark_bg_color;
    border-bottom-color: shade (@dark_bg_color, 0.9);

    color: @backdrop_dark_fg_color;
}

Change them to this:

/* primary-toolbar */
.primary-toolbar,
.primary-toolbar .toolbar,
.primary-toolbar.toolbar,
.menubar.toolbar,
.header-bar {
    -GtkWidget-window-dragging: true;

    /*background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@dark_bg_color, 0.96)),
                                     to (shade (@dark_bg_color, 1.4)));
    border-bottom-color: shade (@dark_bg_color, 1.1);
    border-top-color: shade (@dark_bg_color, 1.09);
    border-style: solid;
    border-width: 1px 0 1px 0;*/

    /*color: @dark_fg_color;*/
    text-shadow: 0 -1px shade (@dark_bg_color, 0.7);

    /*box-shadow: inset 0 1px shade (@dark_bg_color, 0.94);*/
}

.primary-toolbar .toolbar:backdrop,
.primary-toolbar.toolbar:backdrop,
.menubar.toolbar .toolbar:backdrop,
.menubar.toolbar.toolbar:backdrop,
.header-bar:backdrop {
    background-image: none;
    /*background-color: @dark_bg_color;*/
    box-shadow: none;
    /*border-top-color: @dark_bg_color;
    border-bottom-color: shade (@dark_bg_color, 0.9);*/

    color: @backdrop_dark_fg_color;
}

Now when you restart unity, active windows will also have a transparent toolbar.

-1

I had the same question and unfortunately didn't really find a good answer. I can tell you, however, that there is still a theme "GnomishGrey" buried somewhere that works the way you want (I didn't really have time to go looking where it actually is, sorry, but it's not in /usr/share/themes ...) I'm pretty sure I haven't installed it manually and I'm running Trusty Tahr.
Enable it by simply typing

    gsettings set org.gnome.desktop.interface gtk-theme 'GnomishGrey' 

in a terminal (note the 'e' in Grey, not 'a'). I don't really use it, but from what I quickly tested, it works fine also with other transparency settings (ccsm), see picture. enter image description here

Another possibility would be using an emerald theme. As far as I read, it works for 14.04 (but you have to use a ppa to install it), but I don't want to try it out as there might be some issues and I quite like my setup as it is now...

Hope that maybe helps somewhat, even if it's not really an answer.

1
  • 2
    It is not buried. Ubuntu has no theme named 'GnomishGrey' you can type any name which is not available in system. You can try this gsettings set org.gnome.desktop.interface gtk-theme 'abcxyz' Dec 30, 2014 at 17:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .