From 17b76ad3f596cd4f468da8121553241b1a7fcea6 Mon Sep 17 00:00:00 2001 From: greenpsi Date: Thu, 2 Jan 2025 13:39:13 +0100 Subject: [PATCH] sway: allow sway specific hideEdgeBorders options * allow using `--i3` for hideEdgeBorders * add `smart_no_gaps` option --- 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 2869c2bf8f19..6a3fcf1c16c5 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."; };