24

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?

3
  • What is the name of the theme you are using?
    – user25656
    Oct 8, 2013 at 10:41
  • Colorized distinction should be a sane default IMHO. C'mon GNOME!
    – blong
    Sep 21, 2015 at 19:21
  • This problem is even more significant in gedit. Dec 11, 2015 at 20:49

4 Answers 4

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;
}
4
  • Ubuntu 14.04 has the same issue. Your solution solved it for me.
    – nomæd
    Nov 11, 2014 at 11:49
  • Tried the tab:active block alone, no effect. :\ It appears that the file does not get noticed/read by a newly opened gnome-terminal. Could it be in the wrong place, does it have to be referenced from somewhere? Nov 14, 2014 at 14:58
  • Forgot to add: I tried switching to another theme and back (as suggested here: askubuntu.com/a/221783/32201) and still no effect. Nov 14, 2014 at 15:05
  • Perfect solution. Has a few nuances with the way it blends with certain borders, but this is essentially exactly what was needed. Apr 28, 2016 at 15:58
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;
}
5
  • Thanks... this stretch of my life has passed by, but next time I get the problem I'll try that!
    – Stabledog
    Nov 30, 2014 at 20:23
  • Awesome, Tjunkie, this works great on 15.04 Jul 12, 2015 at 15:28
  • It works in 15.10 too. Nov 3, 2015 at 9:08
  • no gtk.css file there in ubuntu 14.04
    – xkeshav
    Feb 10, 2017 at 4:07
  • foreground doesn't work on ubuntu 14.04 lts
    – Tuna
    Jun 23, 2018 at 14:55
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

4
  • Crazy color, but it works =)
    – A.B.
    Nov 12, 2015 at 9:37
  • I must admit my text colour choice is nicer with dark tabs :)
    – Bruce
    Nov 12, 2015 at 9:54
  • Feel free to remove my screenshot. ;)
    – A.B.
    Nov 12, 2015 at 9:54
  • Nah it's all good.
    – Bruce
    Nov 12, 2015 at 9:56
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

3
  • 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 8, 2013 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, 2014 at 22:25
  • @becko The bug is being tracked here: bugs.launchpad.net/ubuntu/+source/ubuntu-themes/+bug/762349 . However, renedv1 's solution is very simple and effective: askubuntu.com/a/406816/31592
    – blong
    Sep 21, 2015 at 19:26

You must log in to answer this question.

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