简体   繁体   English

很棒的WM:忽略wibox几何

[英]Awesome WM: Ignore wibox geometry

I've been tweaking my rc.lua for a while now, and, in favor of a cleaner look, thought of having the wibox as not visible by default. 我已经对rc.lua进行了一段时间的调整,并且为了更简洁的外观,想到将wibox默认情况下不可见。
I already have the means to toggle the visibility, and set it to not visible by default. 我已经可以切换可见性,并默认将其设置为不可见。
The problem is with the layouts and the window padding. 问题在于布局和窗口填充。
All layouts (except for floating) respect the wibox geometry when I toggle it's visibility. 当我切换wibox的可见性时,所有布局(浮动除外)都遵循wibox几何。 My idea was having it appear on top of the windows, but when I toggle, all windows resize to make space for the box. 我的想法是让它显示在窗口顶部,但是当我切换时,所有窗口都会调整大小以为该框腾出空间。
I already tried setting the wibox type to different values, and making it floating. 我已经尝试过将wibox类型设置为不同的值,并使其浮动。
There's no code on the layout's source that explicitly describes that behavior (to my knowledge, at least), so I think it must be a property of the wibox. 布局源上没有任何代码明确描述该行为(至少据我所知),因此我认为它必须是wibox的属性。
Any ideas? 有任何想法吗?
Thanks in advance for your help. 在此先感谢您的帮助。

Try unsetting its struts: w:struts{ left = 0, right = 0, bottom = 0, top = 0 } Only top = 0 should be required (assuming your wibox is at the top), but it doesn't hurt to reset other sides as well. 尝试取消设置其struts: w:struts{ left = 0, right = 0, bottom = 0, top = 0 }仅需要top = 0 (假设您的wibox位于顶部),但是重置它不会带来任何麻烦其他方面也是如此。 :-) :-)

Struts are a concept introduced by EWMH. 支柱是EWMH引入的概念。 It allows a window to reserve some space at the edge of the screen. 它允许窗口在屏幕边缘保留一些空间。 When creating a wibox, awful.wibox sets eg the top strut to the height of the wibox (assuming you have a wibox with position = "top" ). 创建wibox时, awful.wibox例如顶部支柱设置为wibox的高度(假设您有一个position = "top"的wibox)。 This then causes the C code to subtract this value from the available workarea of the screen. 然后,这会使C代码从屏幕的可用工作区中减去该值。

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

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