Waybar
Waybar copied to clipboard
margin-left and margin-right don't work
Tried setting "mode" to "dock" and to "overlay" but it doesn't work. The margin-left and margin-right parameters do not affect the position in any way. I have several bars, and I'm trying to set them on the same level with each other.
WM: Hyprland Waybar version: v0.9.17
I noticed that if I don't specify the "width" parameter, then margin-left and margin-right work, but I need to specify width.
i can't believe how hard it is to do anything like this
-
mode: overlay
disables input; not suitable - Removing
mode
and puttinglayer: top
andexclusive: false
allows the bar to draw over windows: works! - Only having modules-right: pushes bar to right side of screen, correct!
- margin-right allows for an offset: hooray!
BUT THEN
- cannot click through 'invisible' parts of the bar (if you have a long monitor this is a lot of screen space being denied)
- Setting passthrough disables input for the entire bar
- Setting
width
works! The clickable area is shrunk to hopefully only the visible part of the bar - BUT
width
disables margin-left and margin-right
Feels like everything is designed to stop people doing this. Perhaps allowing passthrough where there's no modules would be the easiest way, or making overlay allow input (same thing). It is weird that width disables use of margin, but ideally I'd want the width of the bar to be just of my modules and have there be a separate module which makes it stretch across the monitor.
i can't believe how hard it is to do anything like this
* `mode: overlay` disables input; not suitable * Removing `mode` and putting `layer: top` and `exclusive: false` allows the bar to draw over windows: works! * Only having modules-right: pushes bar to right side of screen, correct! * margin-right allows for an offset: hooray!
BUT THEN
* cannot click through 'invisible' parts of the bar (if you have a long monitor this is a lot of screen space being denied) * Setting passthrough disables input for the entire bar * Setting `width` works! The clickable area is shrunk to hopefully only the visible part of the bar * BUT `width` disables margin-left and margin-right
Feels like everything is designed to stop people doing this. Perhaps allowing passthrough where there's no modules would be the easiest way, or making overlay allow input (same thing). It is weird that width disables use of margin, but ideally I'd want the width of the bar to be just of my modules and have there be a separate module which makes it stretch across the monitor.
You can try to make a transparent bar that covers the entire screen and place several elements with indents in it, which will be your actual bars.
Example:
This should work the same if you only have one bar. In fact, this is a crutch, but it should work right now.
transparent bar
What did you mean by the 'transparent bar?
I similarly have 'control islands' but the transparent space between the islands doesn't admit passthrough - is there a workaround where that would be possible?
#1490 covers this issue too.