Reduce tab strip height in gnome terminal

I recently installed Lubuntu 16.04 with a gnome terminal. I like gnome-terminal to consume less monitor space. But the latest version comes with two annoying buttons in the upper right corner, which makes no sense to me. Since a user who prefers terminals is more likely to use keyboard shortcuts to perform operations with tabs, rather than mouse clicks. With these two additional tabs, the tab bar has expanded and uses more space on the monitor. Click here to view a screenshot . Please help me remove these extra two buttons from the gnome terminal window.

Thanks at Advance

Madhusudhan

+9
source share
4 answers

Since I am using the gnome 3.22.2 shell (similar to izy) that comes with the gnome 3.22.1 terminal (under Arch), the solution posted by Lari Hotari does not work for me. It turns out the CSS class name has changed in bug report # 765590 . The name is now a terminal window instead of TerminalWindow. It comes with gnome from 3.20.2.

The following snippet for ~/.config/gtk-3.0/gtk.css reduces the vertical size of the gnome terminal for me by 10 pixels. Note that I tried to hide the two buttons by setting the display: no, but this has no effect. Perhaps gtk-3.0 does not allow hiding user interface elements (I don’t know).

 /* Decrease the tabs bar height in gnome-terminal * See: * https://stackoverflow.com/questions/36869701/decrease-the-tabs-bar-height-in-gnome-terminal */ terminal-window notebook > header.top button { padding: 0 0 0 0; background-image: none; border: 0; margin-right: 10px; } terminal-window notebook > header.top > tabs > tab { margin: 0 0 0 0; padding: 0 0 0 0; } terminal-window notebook > header.top > tabs > tab label { padding: 0 0 0 0; margin: 0 0 0 0; } 

Be sure to log out / log out of gnome-session after modifying the css file.

Before: Screenshothot before modification

After: Screenshothot after modification

Update: actually removing two buttons from the tab menu bar in the upper right corner (as requested by OP) requires recompiling the gnome terminal (this is not so difficult with apt source under ubuntu). Just remove the call to Terminal_window_fill_notebook_action_box on line 2792 in the src / terminal-window.c file: https://github.com/GNOME/gnome-terminal/blob/8975986d51639040ceb6ba1c0dc78f6a3fa9da45/src/terminal-2792.

+12
source

Adding this parameter to ~/.config/gtk-3.0/gtk.css works for me. It does not remove the buttons, but makes them more pleasant for a dark theme and uses less vertical space.

 TerminalWindow .notebook .button, TerminalWindow .notebook .button:active { padding: 2 2 2 10; background-image: none; border: 0; } 

I use this setting, works well with a dark theme:

 @define-color bg-grey #222; @define-color active-grey #333; @define-color border-grey #555; TerminalWindow .notebook { border: 0; padding: 0; color: #eee; background-color: shade(@active-grey, 1); } TerminalWindow .notebook tab:active { border: 1px solid @border-grey; background-color: shade(@active-grey, 1); } TerminalWindow .notebook tab { background-color: shade(@bg-grey, 1); } TerminalWindow .notebook .button, TerminalWindow .notebook .button:active { padding: 2 2 2 10; background-image: none; border: 0; } 
+4
source

xfce4 xubuntu 17.10

 tee --append ~/.config/gtk-3.0/gtk.css <<SMALLERTABS notebook tab { min-height: 0; padding-top: 0px; padding-bottom: 0px; } notebook tab button { min-height: 0; min-width: 0; padding: 0px; margin-top: 0px; margin-bottom: 0px; } notebook button { min-height: 0; min-width: 0; padding: 0px; } SMALLERTABS 

close the terminal and reopen

link:

+1
source

Gnome 3.28.3 on Ubuntu 18.04

The following code removes the button for me. Here is the effect

 notebook.terminal-notebook > header > box button, notebook.terminal-notebook > header > box button:hover, notebook.terminal-notebook > header > box button:hover:backdrop { margin-top: -100px; /*this is the line that makes buttons disappear.*/ background: inherit; border: inherit; padding: inherit; } 
0
source

All Articles