How to replicate Sway smart borders?

Trying to replicate the behavior of Sway’s smart_borders config option.

smart_borders on|no_gaps|off

If smart_borders are on, borders will only be enabled if the workspace has more than one visible child.

I want borders visible for un-grouped windows and tiled groups.

I do not want a border surrounding a group when it’s the only tile on a display/workspace.

Is this possible? Per the group entry (Variables – Hyprland Wiki) I’m not finding a knob.

Setting the group border color to black is not what I’m looking to achieve here.

This accomplishes the goal:

# Disable borders when only one tile (window or group) exists
workspace = w[tv1], bordersize:0
windowrulev2 = bordersize 0, onworkspace:w[tv1]

# Ensure floating windows still have a border
windowrulev2 = bordersize 2, floating:1
2 Likes

The wiki has a more complete example

1 Like

Thanks. I like my gaps and rounding as I have them set, but did add fullscreen.

workspace = w[tv1], bordersize:0
workspace = f[1], bordersize:0
windowrulev2 = bordersize 0, onworkspace:w[tv1]

And removed the redundant floating border rule.