sway: allow sway specific hideEdgeBorders options (#6304)

* add `smart_no_gaps` option
* allow using `--i3` for hideEdgeBorders:

See e.g. https://man.archlinux.org/man/sway.5#Config_or_runtime_commands:

The --i3 option enables i3-compatible behavior to hide the title bar on tabbed and stacked containers with one child.
Co-authored-by: greenpsi <git@psinet.dev>
This commit is contained in:
greenpsi 2025-01-13 17:26:51 +01:00 committed by GitHub
parent 9616d81f98
commit 0da8b6bae9
Failed to generate hash of commit

View file

@ -421,7 +421,13 @@ in {
};
hideEdgeBorders = mkOption {
type = types.enum [ "none" "vertical" "horizontal" "both" "smart" ];
type = let
i3Options = [ "none" "vertical" "horizontal" "both" "smart" ];
swayOptions = i3Options ++ [ "smart_no_gaps" ];
in if isI3 then
types.enum i3Options
else
types.enum (swayOptions ++ (map (e: "--i3 ${e}") swayOptions));
default = "none";
description = "Hide window borders adjacent to the screen edges.";
};