简体   繁体   English

gnome-shell 3.16 窗口标题

[英]gnome-shell 3.16 window titles

Before 3.16, it was easy to remove the window titles from maximized windows - just editing the metacity-theme.xml file.在 3.16 之前,很容易从最大化窗口中删除窗口标题 - 只需编辑 metacity-theme.xml 文件。 However, 3.16 is using client side decorations, and metacity has no control over the window decorations.但是,3.16 正在使用客户端装饰,并且 metacity 无法控制窗口装饰。 Is there another way of hiding the window titles, or at least making them much smaller?是否有另一种隐藏窗口标题的方法,或者至少使它们更小?

You can minimize (not remove) the title bar by removing the padding from it.您可以通过从中删除填充来最小化(而不是删除)标题栏。 Just add the following code to the file $HOME/.config/gtk-3.0/gtk.css (create if not exists):只需将以下代码添加到文件$HOME/.config/gtk-3.0/gtk.css (如果不存在则创建):

.maximized .header-bar.default-decoration {
    padding: 0;
    font-size: 0.7em;
}

.maximized .header-bar.default-decoration .button.titlebutton {
    padding: 0;
    border-width: 0;
}

Apart from that you can use the GNOME extension Maximus Two to get completely rid of title bars on maximized windows.除此之外,您可以使用 GNOME 扩展Maximus Two来完全摆脱最大化窗口上的标题栏。 A version supporting 3.16 is available from here: http://michaeltunnell.com/blog/16-linux/56-my-updated-316-packages-for-gnome-extensions可从此处获得支持 3.16 的版本: http : //michaeltunnell.com/blog/16-linux/56-my-updated-316-packages-for-gnome-extensions

Here is a very short script that does more or less the same as Maximus Two (using the _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED atom): https://gist.github.com/tuxor1337/74e76d3d153c67593454 You need to run it on GNOME startup and leave it running in the background (might be helpful: Start Script when Gnome Starts Up ).这是一个非常短的脚本,它或多或少与Maximus Two相同(使用_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED原子): https : _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED您需要在 GNOME 启动时运行它并让它在背景(可能有帮助: Gnome 启动时启动脚本)。

By the way, here you can get an idea of how to remove the title bar from all windows: https://unix.stackexchange.com/questions/156300/xprop-set-motif-wm-hints-hides-maximized-window顺便说一句,在这里您可以了解如何从所有窗口中删除标题栏: https : //unix.stackexchange.com/questions/156300/xprop-set-motif-wm-hints-hides-maximized-window

I tried the extension Maximus NG , which did not install successfully.我尝试了扩展Maximus NG ,但没有成功安装。 But via its comments I found Pixel Saver which works better.但是通过它的评论,我发现Pixel Saver效果更好。 However it displays a cross to close the windows among the status buttons in the top right, which I find annoying.然而,它显示一个十字来关闭右上角的状态按钮之间的窗口,我觉得这很烦人。 But after disabling Pixel Saver again, the top bar of maximized windows has not reappeared, and the cross has disappeared. 但是再次禁用Pixel Saver后,最大化窗口的顶部栏没有重新出现,十字也消失了。 So everything is perfect for me now. 所以现在一切对我来说都是完美的。 EDIT : This effect only lasts the current session.编辑:此效果仅持续当前会话。

I use Gnome 3.18, on Ubuntu-Gnome 16.04 LTS Beta 1.我在 Ubuntu-Gnome 16.04 LTS Beta 1 上使用 Gnome 3.18。

Pixel saver helped on Ubuntu 20.04.1 LTS像素保护程序在 Ubuntu 20.04.1 LTS 上有所帮助

sudo apt-get install gnome-tweak-tool

Then press "super" button and type "tweaks" - select "tweaks", go to "Extensions" - enable "Pixel saver" radio button.然后按“超级”按钮并输入“调整”-选择“调整”,转到“扩展”-启用“像素保护程序”单选按钮。 That's it就是这样

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM