From 0da8b6bae9b3179af68c72827541ef88cad413fc Mon Sep 17 00:00:00 2001 From: greenpsi <123899120+greenpsi@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:26:51 +0100 Subject: [PATCH] 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 --- modules/services/window-managers/i3-sway/lib/options.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/services/window-managers/i3-sway/lib/options.nix b/modules/services/window-managers/i3-sway/lib/options.nix index 2869c2bf..6a3fcf1c 100644 --- a/modules/services/window-managers/i3-sway/lib/options.nix +++ b/modules/services/window-managers/i3-sway/lib/options.nix @@ -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."; };