diff --git a/flake.lock b/flake.lock index 6f6f54e..2cbd88f 100644 --- a/flake.lock +++ b/flake.lock @@ -2489,11 +2489,11 @@ }, "twm": { "locked": { - "lastModified": 1789847958, - "narHash": "sha256-0XZpBvmt677u2zqy53OI2gBtkJCOtH2lxUAgv3Lvnxc=", + "lastModified": 1789849521, + "narHash": "sha256-FYFqM30bMqGgXHgAMb2K85mhV0kdVuevLGZlViALDCU=", "owner": "tuxdotrs", "repo": "twm", - "rev": "e3352d44ce24e3319901c4eb30a0758cb0fb6171", + "rev": "4b8cf8739b5051b9eab56ee7505dbbd5308868ba", "type": "github" }, "original": { diff --git a/modules/hm/desktop/hyprland.nix b/modules/hm/desktop/hyprland.nix index aaec5ad..51317b2 100644 --- a/modules/hm/desktop/hyprland.nix +++ b/modules/hm/desktop/hyprland.nix @@ -16,6 +16,12 @@ default = ""; description = "Hyprland monitor configuration"; }; + + workspaceConfig = mkOption { + type = types.lines; + default = ""; + description = "Hyprland workspace configuration"; + }; }; config = mkIf cfg.enable { @@ -34,6 +40,7 @@ source = pkgs.twm.hyprland; }; ".config/hypr/config/monitors.lua".text = cfg.monitorConfig; + ".config/hypr/config/workspaces.lua".text = cfg.workspaceConfig; }; home.packages = with pkgs; [ diff --git a/modules/hosts/canopus/home.nix b/modules/hosts/canopus/home.nix index 0a4c7a5..f7dd76a 100644 --- a/modules/hosts/canopus/home.nix +++ b/modules/hosts/canopus/home.nix @@ -16,6 +16,16 @@ scale = "1", }) ''; + + workspaceConfig = '' + hl.workspace_rule({ workspace = "1", monitor = "eDP-1", default = true }) + hl.workspace_rule({ workspace = "2", monitor = "eDP-1" }) + hl.workspace_rule({ workspace = "3", monitor = "eDP-1" }) + hl.workspace_rule({ workspace = "4", monitor = "eDP-1" }) + hl.workspace_rule({ workspace = "5", monitor = "eDP-1" }) + hl.workspace_rule({ workspace = "6", monitor = "eDP-1", layout = "scrolling" }) + hl.workspace_rule({ workspace = "7", monitor = "eDP-1", layout = "scrolling" }) + ''; }; mangowm = { diff --git a/modules/hosts/sirius/home.nix b/modules/hosts/sirius/home.nix index 89107e7..2a7498e 100644 --- a/modules/hosts/sirius/home.nix +++ b/modules/hosts/sirius/home.nix @@ -32,6 +32,16 @@ transform = 3, }) ''; + + workspaceConfig = '' + hl.workspace_rule({ workspace = "1", monitor = "DP-3", default = true }) + hl.workspace_rule({ workspace = "2", monitor = "DP-3" }) + hl.workspace_rule({ workspace = "3", monitor = "DP-3" }) + hl.workspace_rule({ workspace = "4", monitor = "DP-3" }) + hl.workspace_rule({ workspace = "5", monitor = "DP-3" }) + hl.workspace_rule({ workspace = "6", monitor = "DP-2", layout = "scrolling", layout_opts = { direction = "down" } }) + hl.workspace_rule({ workspace = "7", monitor = "DP-1", layout = "scrolling", layout_opts = { direction = "down" } }) + ''; }; mangowm = {