feat(registry): add repeating keybind option

This commit is contained in:
2026-10-11 14:57:32 -04:00
parent 49b7342f65
commit 1836c6c234
2 changed files with 12 additions and 1 deletions

View File

@@ -65,6 +65,7 @@
name = "hyprland-resize-${direction}"; name = "hyprland-resize-${direction}";
value = { value = {
keys = "SUPER + ALT + ${key}"; keys = "SUPER + ALT + ${key}";
repeating = true;
action = { action = {
kind = "resize-window"; kind = "resize-window";
inherit direction; inherit direction;
@@ -162,7 +163,10 @@
} }
.${keybind.action.kind} .${keybind.action.kind}
)) ))
]; ]
++ lib.optional keybind.repeating {
repeating = true;
};
}) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind); }) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind);
}; };
}; };

View File

@@ -36,6 +36,13 @@
example = "SUPER + Return"; example = "SUPER + Return";
}; };
repeating = lib.mkOption {
description = "Repeats the keybind action while the key chord is held.";
type = lib.types.bool;
default = false;
example = true;
};
action = lib.mkOption { action = lib.mkOption {
description = "Declares the action this keybind runs."; description = "Declares the action this keybind runs.";
type = lib.types.submodule { type = lib.types.submodule {