25

In Ubuntu 13.04, I often have multiple tabs open in gnome-terminal. The problem is that, while I can set the title of each tab, it is very hard to tell which tab is active -- the color and rendering distinction between the active tab and the inactive tab is so subtle that one must study the tab bar very carefully.

Is there a way to make this contrast more obvious?

zwets
  • 12,354
Stabledog
  • 981

4 Answers4

22

I'm running Ubuntu 13.10 with the Ambience theme - had the same problem.

Solution: edit ~/.config/gtk-3.0/gtk.css (you might have to create it) and add:

TerminalWindow,
TerminalWindow.background {
        background-color: #6e6e6e;
        color: #000000;
}

TerminalWindow .notebook tab {
        padding: 2;
        background-color: #6e6e6e;
}

TerminalWindow .notebook tab:active {
        background-color: #d1d1d1;
}
Luís de Sousa
  • 13,227
  • 26
  • 81
  • 128
renedv1
  • 336
  • 2
  • 3
11

Here is what worked for me in ubuntu 14.04, I tried to maintain similar overall look, and make the inactive tabs less bright.

edit the file ~/.config/gtk-3.0/gtk.css

to contain

TerminalWindow .notebook tab:active {
    background-color: #f5f4f3;
    foreground-color: #000000;
}

TerminalWindow .notebook tab {
    background-color: #d2d1d0;
    foreground-color: #2e2d2c;
}

close ALL terminal windows start and test

EDIT: After using that for a little while it became clear that a pronounced difference between active and inactive tab is not enough.

I think it is necessary to be able to tell an inactive tab at the first glance - without looking to its sides.

So here is the updated configuration (darker inactive tabs):

TerminalWindow .notebook tab:active {
    background-color: #f5f4f3;
    foreground-color: #000000;
}

TerminalWindow .notebook tab {
    background-color: #a2a1a0;
    foreground-color: #1e1d1c;
}
Tjunkie
  • 241
5

If you wish to make the text of the active tab more obvious you can modify it's label like this,

edit the file ~/.config/gtk-3.0/gtk.css

TerminalTabLabel.active-page .label {
    color: cyan;
    font-weight: bold;
}

Tested in gnome-terminal 3.17.91

enter image description here

enter image description here

Here is what I'm using at work on Ubuntu 15.10 with gnome-terminal 3.16.2. The smaller tab size allows more screen area for the terminal to use and I've experimented with the contrast between active and inactive tabs. I think the tab label text looks better without the bold style applied.

/* gnome-terminal */
@define-color term-win-bg           #262626;
@define-color term-tab-inactive-bg  #333333;
@define-color term-tab-active-bg    #424242;
@define-color ubuntu-orange         #fb9267;

TerminalScreen {
    -TerminalScreen-background-darkness: 0.95;
    background-color: @term-win-bg;
}


TerminalWindow .notebook {
    border: 0;
    padding: 0;
}


TerminalWindow .notebook tab {
    border: 0;
    border-radius: 0px;
    border-image: -gtk-gradient (linear, left top, left bottom,
                                from (alpha (shade (@term-win-bg, 0.9), 0.0)),
                                to (shade (@term-win-bg, 0.9))) 1;
    border-image-width: 0 1px;
    border-color: transparent;
    border-width: 0;
    box-shadow: none;
    background-color: shade(@term-tab-inactive-bg, 1);
}


TerminalWindow .notebook tab:active {
    border: 0;
    border-radius: 0px;
    background-color: shade(@term-tab-active-bg, 1);
}


TerminalTabLabel.active-page .label {
    /*color: @bg_color;
    font-weight: bold
    color: @ubuntu-orange; */
    color: cyan;
}

enter image description here

Bruce
  • 191
  • 1
  • 4
4

I don't have any problem to distinguish active and inactive tabs in gnome-terminal using the default Ubuntu theme - Ambiance.

Looking on Launchpad, I found that this is a confirmed bug affecting many people: Difficult to distinguish which tab is selected.

If this is affecting you also, you can solve this by changing your Ubuntu theme: right click on the desktop, select Change Desktop Background and in the new opened window change your theme to High Contrast:

change ubuntu theme

Then you can distinguish without problems your active and inactive tabs in gnome-terminal:

terminal tabs

Radu Rădeanu
  • 169,590
  • 2
    Ok, that's an idea. I guess I was hoping for something less global and dramatic than changing the entire desktop theme -- but if that's the only way, I guess it's worth it. Thanks! – Stabledog Oct 08 '13 at 11:17
  • Any updates on this for 14.04? Changing the whole theme feels like overkill. And High Contrast in particular is very ugly. – a06e Oct 15 '14 at 22:25
  • @becko The bug is being tracked here: https://bugs.launchpad.net/ubuntu/+source/ubuntu-themes/+bug/762349 . However, renedv1 's solution is very simple and effective: http://askubuntu.com/a/406816/31592 – blong Sep 21 '15 at 19:26