hyprwm/Hyprland

Smart Borders

Riolku opened this issue ยท 13 comments

As per #355, hyprland has smart gaps (yay!).

However, there isn't similar support for smart borders. What I'm looking for is the ability to hide borders along the screen edge when gaps_out = 0.

I can set gaps_in = 1 and disable borders, but then my borders aren't coloured.

Can we have smart borders?

isnt this scriptable

Took a quick look, and I don't know. How would I script this?

well, execute hyprctl keyword general:border_size 0 whenever you change the gaps out to 0 I guess, idk how you manage "when gaps_out = 0"

That's not what I want. I want, with two horizontally split windows on screen, to have a border line drawn between the two, but no other border lines drawn

oh, why not say that right from the start?

tcmal commented

no_gaps_when_only in the master layout also disables borders (although the documentation only mentions gaps), which seems to do what you want, but I'm not sure if other layouts have a similar option.

Visne commented

You can kind of get this effect by setting gaps_out to a negative value

Not super prioritary, but it's a nice to have behavior.

Would also appreciate support for this.
Previously under sway I would use hide_edge_borders both with no gaps. This would draw borders between windows, but not against the edge of my monitor.
Currently on Hyprland, I have to choose between either having borders in all cases, even when only a single window is present in a workspace (which reduces the size of the window and messes with aspect ratio a little), or having no borders at all, which makes windows look a little strange when side by side.

Basically, support for Sway's hide_edge_borders option would be very much appreciated.

hide_edge_borders [--i3] none|vertical|horizontal|both|smart|smart_no_gaps
Hides window borders adjacent to the screen edges. Default is none. The --i3 option enables
i3-compatible behavior to hide the title bar on tabbed and stacked containers with one
child. The smart|smart_no_gaps options are equivalent to setting smart_borders smart|no_gaps
and hide_edge_borders none.

haasn commented

To anybody else frustrated by this, you can partially alleviate this bug by doing the following:

windowrulev2 = noborder, fullscreen:1

this will at least get rid of the unnecessary borders for fullscreened windows, although it doesn't prevent a border from being drawn around a solitary window that just happens to fill the entire workspace

windowrulev2 = noborder,onworkspace:1?

haasn commented

windowrulev2 = noborder,onworkspace:1?

Perfect, thanks. I consider this issue solved for my use case.

haasn commented

windowrulev2 = noborder,onworkspace:1?

This appears to break for graphical apps that spawn menus as separate windows (android studio...), which leads to horrific flickering every time you interact with the toolbar. What would be needed is a count of tiled windows on the workspace. (Or just a binary property that's true if this is the only tiled window)