hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
20.75k stars 874 forks source link

Smart Borders #2324

Open Riolku opened 1 year ago

Riolku commented 1 year ago

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?

vaxerski commented 1 year ago

isnt this scriptable

Riolku commented 1 year ago

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

vaxerski commented 1 year ago

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"

Riolku commented 1 year ago

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

vaxerski commented 1 year ago

oh, why not say that right from the start?

tcmal commented 1 year ago

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 1 year ago

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

Zeioth commented 1 year ago

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

Ghosthree3 commented 1 year ago

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 8 months ago

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

vaxerski commented 8 months ago

windowrulev2 = noborder,onworkspace:1?

haasn commented 8 months ago

windowrulev2 = noborder,onworkspace:1?

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

haasn commented 8 months ago

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)