refactor(hyprland): inline workspace key text

This commit is contained in:
2026-10-11 14:52:08 -04:00
parent b15a153188
commit bff5b61d2f

View File

@@ -11,16 +11,11 @@
registry.keybind.${config.networking.hostName} = lib.mkMerge [ registry.keybind.${config.networking.hostName} = lib.mkMerge [
# Generate numeric workspace keybinds. # Generate numeric workspace keybinds.
(lib.listToAttrs ( (lib.listToAttrs (
lib.concatMap ( lib.concatMap (workspace: [
workspace:
let
workspaceText = toString workspace;
in
[
{ {
name = "hyprland-workspace-${workspaceText}"; name = "hyprland-workspace-${toString workspace}";
value = { value = {
keys = "SUPER + ${workspaceText}"; keys = "SUPER + ${toString workspace}";
action = { action = {
kind = "focus"; kind = "focus";
inherit workspace; inherit workspace;
@@ -28,17 +23,16 @@
}; };
} }
{ {
name = "hyprland-move-to-workspace-${workspaceText}"; name = "hyprland-move-to-workspace-${toString workspace}";
value = { value = {
keys = "SUPER + SHIFT + ${workspaceText}"; keys = "SUPER + SHIFT + ${toString workspace}";
action = { action = {
kind = "move-window"; kind = "move-window";
inherit workspace; inherit workspace;
}; };
}; };
} }
] ]) (lib.range 1 9)
) (lib.range 1 9)
)) ))
# Generate directional keybinds. # Generate directional keybinds.