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.

floryn
  • 101

3 Answers3

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

user.dz
  • 49,176
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.

Thomas
  • 1
-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.