From 9ccfe2be56a8e9140a9597987f3ee8d72d54d91b Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Fri, 29 Sep 2023 09:38:43 +0200 Subject: [PATCH] sway: Make desktop-monitor assignment configurable --- home-manager/modules/sway/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index dd68c84..2a085da 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -45,6 +45,25 @@ in }; }); }; + workspaceOutputs = mkOption { + description = "Assign workspaces to outputs"; + type = types.listOf (types.submodule { + options = { + output = mkOption { + description = "Name(s) of the output to assign"; + type = with types; either str (listOf str); + apply = lists.toList; + default = ""; + }; + workspace = mkOption { + description = "Name of the workspace to assign"; + type = types.str; + default = ""; + }; + }; + }); + default = [ ]; + }; }; config = mkIf cfg.enable { @@ -102,6 +121,8 @@ in defaultWorkspace = "workspace number 1"; + workspaceOutputAssign = cfg.workspaceOutputs; + left = "n"; down = "e"; up = "i";