refactor(hyprland): move terminal keybind into registry

This commit was merged in pull request #147.
This commit is contained in:
2026-10-10 15:41:32 -04:00
parent 85fadc5bfc
commit fddec14128
4 changed files with 63 additions and 10 deletions

View File

@@ -0,0 +1,37 @@
{ lib, util, ... }:
{
checks = [
{
assertion = util.registry.predicates.uniquePerHost (entry: entry.value.keys);
message = "Desktop keybinds must use unique key chords per host.";
}
];
type = lib.types.submodule {
options = {
keys = lib.mkOption {
description = "Sets the key chord for this desktop keybind.";
type = lib.types.str;
example = "SUPER + Return";
};
action = lib.mkOption {
description = "Declares the action this keybind runs.";
type = lib.types.submodule {
options = {
kind = lib.mkOption {
description = "Selects the keybind action kind.";
type = lib.types.enum [ "exec" ];
};
command = lib.mkOption {
description = "Command executed by this keybind.";
type = lib.types.str;
example = "ghostty";
};
};
};
};
};
};
}