Decrease the tabs bar height in gnome terminal(减少 gnome 终端中的标签栏高度)
问题描述
我最近用 gnome-terminal 安装了 Lubuntu 16.04.我喜欢 gnome-terminal 在显示器上消耗更少的空间.但是最新版本的右上角有两个烦人的按钮,这对我来说毫无意义.因为,喜欢终端的用户更有可能使用键盘快捷键来执行选项卡操作,而不是点击鼠标.有了这两个额外的按钮,标签栏变得更宽,并在显示器上占用更多空间.
之后:
更新:实际上从右上角的选项卡菜单栏中删除两个按钮(根据 OP 的要求)需要您重新编译 gnome-terminal(在 ubuntu 下使用 apt 源并不难).只需删除 src/terminal-window.c 中第 2792 行的 terminal_window_fill_notebook_action_box 调用:https://github.com/GNOME/gnome-terminal/blob/8975986d51639040ceb6ba1c0dc78f6a3fa9da45/src/terminal-window.c#L2792
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 终端中的标签栏高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:减少 gnome 终端中的标签栏高度


- Fetch API 如何获取响应体? 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01