refactor(hyprland): move terminal keybind into registry
This commit was merged in pull request #147.
This commit is contained in:
@@ -12,6 +12,14 @@ in
|
||||
options.modules.desktop.apps.ghostty.enable = lib.mkEnableOption "Ghostty as the desktop terminal";
|
||||
|
||||
config = lib.mkIf config.modules.desktop.apps.ghostty.enable {
|
||||
registry.keybind.${config.networking.hostName}.ghostty = {
|
||||
keys = "SUPER + Return";
|
||||
action = {
|
||||
kind = "exec";
|
||||
command = "${pkgs.ghostty}/bin/ghostty";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.${user}.home.packages = [ pkgs.ghostty ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user