问题描述
我最近安装了带有gnome-terminal的Lubuntu 16.04。我喜欢gnome-terminal消耗更少的显示器空间。但是最新版本的右上角带有两个烦人的按钮,这对我来说毫无意义。因为,喜欢终端的用户更有可能使用键盘快捷键来执行选项卡操作,而不是单击鼠标。通过这两个额外的按钮,选项卡栏变得更宽,并在显示器上使用了更多空间。
之后:
更新:实际上是从标签菜单中删除了两个按钮右上角的栏(按OP的要求)要求您重新编译gnome-terminal(使用ubuntu下的apt源并不困难)。只需删除src / terminal-window.c中第2792行的terminal_window_fill_notebook_action_box调用即可:
I recently installed Lubuntu 16.04 with gnome-terminal. I like gnome-terminal to consume less space on monitor. But latest version comes with two annoying buttons at the right top corner which makes no sense to me. Because, user who prefer terminals are more likely to use keyboard shortcuts to do tabs operations rather than go for mouse clicks. With these two extra buttons tabs bar got wider and uses more space on the monitor. Click here for Screenshot. Please help me in removing this extra two buttons from the gnome-terminal window.
Thanks in Advance
Madhusudhan
As I am running gnome shell 3.22.2 (same as izy) which ships with gnome-terminal 3.22.1 (under Arch), the solution posted by Lari Hotari doesn't work for me. It turns out that the CSS class name has changed in bug report #765590. The name is now terminal-window instead of TerminalWindow. This has been shipping with gnome since 3.20.2-ish.
The following snippet for ~/.config/gtk-3.0/gtk.css
reduces the vertical size of gnome-terminal by 10px for me. Note that I tried hiding the two buttons by setting display: none but this has no effect. Maybe gtk-3.0 does not allow hiding ui elements (no idea).
/* 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;
}
Make sure to logout/login out of gnome-session after changing the css file.
Before:
After:
Update: actually removing the two buttons from the tabs menu bar in the top right corner (as requested by the OP) requires you to re-compile gnome-terminal (it isn't that difficult with apt source under ubuntu). Just remove the terminal_window_fill_notebook_action_box call on line 2792 in src/terminal-window.c: https://github.com/GNOME/gnome-terminal/blob/8975986d51639040ceb6ba1c0dc78f6a3fa9da45/src/terminal-window.c#L2792
这篇关于降低gnome终端中的标签栏高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!