commit d60358f332fa2adbd3eeca6258e330d26750784c parent c05c0ad5c07d74e48070eae5d162b2a9b35c4207 Author: Francesco Saccone <francesco@francescosaccone.com> Date: Sun, 6 Apr 2025 18:57:44 +0200 refactor: define 'default' window colors definition Signed-off-by: Francesco Saccone <francesco@francescosaccone.com> Diffstat:
M | modules/home/sway/default.nix | | | 32 | +++++++++++++++++++------------- |
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/modules/home/sway/default.nix b/modules/home/sway/default.nix @@ -75,8 +75,17 @@ output."*".background = "${./background.png} fill"; - colors = rec { + colors = let + default = { + inherit (colors) background; + border = colors.background; + childBorder = colors.background; + indicator = colors.background; + text = colors.white; + }; + in rec { background = colors.transparent; + focused = { background = colors.white; border = colors.white; @@ -84,20 +93,17 @@ indicator = colors.white; text = colors.background; }; - focusedInactive = { - inherit (colors) background; - border = colors.background; - childBorder = colors.background; - indicator = colors.background; - text = colors.white; - }; - unfocused = focusedInactive; + + focusedInactive = default; + unfocused = default; urgent = { - inherit (colors) background; + inherit (default) + background + childBorder + indicator + text + ; border = colors.red; - childBorder = colors.background; - indicator = colors.background; - text = colors.white; }; };