From 7ee2f966b34420f0ae302994081c755384b8a017 Mon Sep 17 00:00:00 2001 From: alexion Date: Sun, 11 Oct 2026 14:43:56 -0400 Subject: [PATCH] feat(hyprland): add workspace window movement binds --- .../desktop/session/hyprland/default.nix | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/configs/nixos/modules/desktop/session/hyprland/default.nix b/configs/nixos/modules/desktop/session/hyprland/default.nix index 33c687e..0cf1657 100644 --- a/configs/nixos/modules/desktop/session/hyprland/default.nix +++ b/configs/nixos/modules/desktop/session/hyprland/default.nix @@ -31,16 +31,34 @@ in registry.keybind.${config.networking.hostName} = lib.mkMerge [ # Generate numeric workspace keybinds. (lib.listToAttrs ( - map (workspace: { - name = "hyprland-workspace-${toString workspace}"; - value = { - keys = "SUPER + ${toString workspace}"; - action = { - kind = "focus"; - inherit workspace; - }; - }; - }) (lib.range 1 9) + lib.concatMap ( + workspace: + let + workspaceText = toString workspace; + in + [ + { + name = "hyprland-workspace-${workspaceText}"; + value = { + keys = "SUPER + ${workspaceText}"; + action = { + kind = "focus"; + inherit workspace; + }; + }; + } + { + name = "hyprland-move-to-workspace-${workspaceText}"; + value = { + keys = "SUPER + Shift + ${workspaceText}"; + action = { + kind = "move-window"; + inherit workspace; + }; + }; + } + ] + ) (lib.range 1 9) )) # Generate directional keybinds. (lib.listToAttrs (