0

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.
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. 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.
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.
Any ideas?
Thanks in advance for your help.

sferaud
  • 1
  • 1

1 Answers1

1

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 are a concept introduced by EWMH. It allows a window to reserve some space at the edge of the screen. When creating a wibox, awful.wibox sets e.g. the top strut to the height of the wibox (assuming you have a wibox with position = "top"). This then causes the C code to subtract this value from the available workarea of the screen.

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39
  • Thanks for the ansew @uli. It didn't help though. Padding's still there. But by searching for the struts method I stumbled upon the new documentation, which is by far a higher payoff than solving the original problem :D. – sferaud Jun 28 '16 at 20:39
  • Update. There's a function in the wibox library that updates the wibox struts every time the visibility changes. So when I toggle, I must overwrite the strut. Thanks for the help. Wouldn't have found that if it wasnt for the heads up about strut. – sferaud Jun 28 '16 at 21:48
  • Oh right. Without that function, an invisible wibox would still reserve some space. Sorry for missing that. And happy to hear that the improved docs really are improved. :-) – Uli Schlachter Jun 29 '16 at 08:38