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