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

@@ -8,6 +8,7 @@
options.modules.desktop.session.hyprland.enable = lib.mkEnableOption "the Hyprland compositor";
config = lib.mkIf config.modules.desktop.session.hyprland.enable {
# This program integration owns the session, portals, and polkit, launched
# through the universal Wayland session manager.
programs.hyprland = {
@@ -34,14 +35,12 @@
settings = {
config.general.layout = "dwindle";
bind = [
{
_args = [
"SUPER + Return"
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("ghostty")'')
];
}
];
bind = lib.mapAttrsToList (_name: keybind: {
_args = [
keybind.keys
(lib.generators.mkLuaInline "hl.dsp.exec_cmd(${lib.generators.toLua { } keybind.action.command})")
];
}) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind);
};
};
};