diff --git a/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix b/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix index 39026b4..c2e389a 100644 --- a/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix +++ b/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix @@ -48,6 +48,24 @@ in lib.mkEnableOption "the hyprlock lock screen"; config = lib.mkIf config.modules.desktop.session.hyprland.hyprlock.enable { + registry.keybind.${config.networking.hostName} = { + hyprlock-lock = { + keys = "SUPER + X"; + action = { + kind = "exec"; + command = "${pkgs.procps}/bin/pidof hyprlock || ${hyprlock}"; + }; + }; + + hyprlock-toggle-idle-inhibit = { + keys = "SUPER + CTRL + X"; + action = { + kind = "exec"; + command = "${idleLockToggle}"; + }; + }; + }; + home-manager.users.${user} = { # Colors and the lock-screen background come from Stylix's hyprlock target, # so only geometry and behaviour are set here. @@ -82,15 +100,6 @@ in }; }; - # Lock on Super+X. - # The guard drops the keypress when a locker is already up, so a second - # hyprlock never stacks over the first. - /* - wayland.windowManager.hyprland.settings.bind = [ - "$mod, X, exec, ${pkgs.procps}/bin/pidof hyprlock || ${hyprlock}" - "$mod CTRL, X, exec, ${idleLockToggle}" - ]; - */ }; }; } diff --git a/configs/nixos/modules/desktop/session/mako.nix b/configs/nixos/modules/desktop/session/mako.nix index b780147..1a5ef86 100644 --- a/configs/nixos/modules/desktop/session/mako.nix +++ b/configs/nixos/modules/desktop/session/mako.nix @@ -14,6 +14,14 @@ in options.modules.desktop.session.mako.enable = lib.mkEnableOption "the mako notification daemon"; config = lib.mkIf config.modules.desktop.session.mako.enable { + registry.keybind.${config.networking.hostName}.mako-history = { + keys = "SUPER + N"; + action = { + kind = "exec"; + command = "${makoctl} restore"; + }; + }; + home-manager.users.${user} = { # Colors and the popup font come from Stylix's mako target, so only # behaviour is set here. @@ -32,14 +40,6 @@ in }; }; - # Recall the last notification from history, keyboard-only like the rest - # of the session. - # $mod is defined by the compositor config these binds share. - /* - wayland.windowManager.hyprland.settings.bind = [ - "$mod, N, exec, ${makoctl} restore" - ]; - */ }; }; } diff --git a/configs/nixos/modules/desktop/session/rofi.nix b/configs/nixos/modules/desktop/session/rofi.nix index 064a25e..8339db4 100644 --- a/configs/nixos/modules/desktop/session/rofi.nix +++ b/configs/nixos/modules/desktop/session/rofi.nix @@ -26,6 +26,24 @@ in options.modules.desktop.session.rofi.enable = lib.mkEnableOption "the rofi launcher"; config = lib.mkIf config.modules.desktop.session.rofi.enable { + registry.keybind.${config.networking.hostName} = { + rofi-launcher = { + keys = "SUPER + R"; + action = { + kind = "exec"; + command = "${pkgs.rofi}/bin/rofi -show drun"; + }; + }; + + rofi-power-menu = { + keys = "SUPER + SHIFT + X"; + action = { + kind = "exec"; + command = "${powerMenu}"; + }; + }; + }; + home-manager.users.${user} = { # No theme is set here: Stylix's rofi target supplies the Nord one. programs.rofi = { @@ -40,14 +58,6 @@ in }; }; - # The launcher and the session menu, kept next to the tool they drive. - # $mod is defined by the compositor config these binds share. - /* - wayland.windowManager.hyprland.settings.bind = [ - "$mod, R, exec, ${pkgs.rofi}/bin/rofi -show drun" - "$mod SHIFT, X, exec, ${powerMenu}" - ]; - */ }; }; }