diff --git a/configs/nixos/modules/desktop/session/hyprland/default.nix b/configs/nixos/modules/desktop/session/hyprland/default.nix index 0255d3f..c412dee 100644 --- a/configs/nixos/modules/desktop/session/hyprland/default.nix +++ b/configs/nixos/modules/desktop/session/hyprland/default.nix @@ -7,7 +7,7 @@ let mkBind = keybind: { _args = [ - (lib.concatStringsSep " + " keybind.keys) + keybind.keys (lib.generators.mkLuaInline "hl.dsp.exec_cmd(${toLua keybind.command})") ]; }; @@ -23,10 +23,7 @@ in config = lib.mkIf config.modules.desktop.session.hyprland.enable { registry.keybind.${config.networking.hostName} = { hyprland-terminal = { - keys = [ - "SUPER" - "Return" - ]; + keys = "SUPER + Return"; command = "ghostty"; }; }; diff --git a/configs/nixos/registry/keybind.nix b/configs/nixos/registry/keybind.nix index ab0578e..69560a6 100644 --- a/configs/nixos/registry/keybind.nix +++ b/configs/nixos/registry/keybind.nix @@ -1,21 +1,12 @@ { lib, ... }: { - checks = [ - { - assertion = entries: lib.all (entry: entry.value.keys != [ ]) entries; - message = "Desktop keybinds must set at least one key."; - } - ]; type = lib.types.submodule { options = { keys = lib.mkOption { - type = lib.types.listOf lib.types.str; - example = [ - "SUPER" - "Return" - ]; - description = "Sets the ordered key parts for this desktop keybind."; + type = lib.types.str; + example = "SUPER + Return"; + description = "Sets the key chord for this desktop keybind."; }; command = lib.mkOption {