From b3ffb6c3f3568a5e1e2096381ca87ddf54e55de7 Mon Sep 17 00:00:00 2001 From: alexion Date: Sun, 11 Oct 2026 17:20:30 -0400 Subject: [PATCH] refactor(hypridle): inline command paths --- .../modules/desktop/session/hyprland/hypridle.nix | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/configs/nixos/modules/desktop/session/hyprland/hypridle.nix b/configs/nixos/modules/desktop/session/hyprland/hypridle.nix index 7aae030..53370db 100644 --- a/configs/nixos/modules/desktop/session/hyprland/hypridle.nix +++ b/configs/nixos/modules/desktop/session/hyprland/hypridle.nix @@ -5,15 +5,6 @@ ... }: # hypridle: idle-triggered locking and display power management. -let - # The guard drops the call when a locker is already up, so no idle trigger - # stacks a second hyprlock over the first. - lockCmd = "${pkgs.procps}/bin/pidof hyprlock || ${hyprlock}"; - - hyprctl = "${config.programs.hyprland.package}/bin/hyprctl"; - hyprlock = "${pkgs.hyprlock}/bin/hyprlock"; - -in { options.modules.desktop.session.hyprland.hypridle.enable = lib.mkEnableOption "hypridle idle management"; @@ -28,10 +19,12 @@ in settings = { general = { - lock_cmd = lockCmd; + # The guard drops the call when a locker is already up, so no idle + # trigger stacks a second hyprlock over the first. + lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; before_sleep_cmd = "loginctl lock-session"; # Waking pokes the compositor in case firmware leaves displays dark. - after_sleep_cmd = "${hyprctl} dispatch 'hl.dsp.dpms({ action = \"enable\" })'"; + after_sleep_cmd = "${config.programs.hyprland.package}/bin/hyprctl dispatch 'hl.dsp.dpms({ action = \"enable\" })'"; }; listener = [