refactor(hyprland): move terminal keybind into registry
This commit was merged in pull request #147.
This commit is contained in:
37
configs/nixos/registry/keybind.nix
Normal file
37
configs/nixos/registry/keybind.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user