From 31c603f36883b99c1ea472bf2bf37e0c3d8fd799 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 12 May 2024 22:05:25 +0530 Subject: [PATCH] prevent starting multiple instances of hyprlock --- home/wm/addon/hypridle.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/wm/addon/hypridle.nix b/home/wm/addon/hypridle.nix index c5ffbce..7952b8a 100644 --- a/home/wm/addon/hypridle.nix +++ b/home/wm/addon/hypridle.nix @@ -9,7 +9,7 @@ in enable = true; settings = { general = { - lock_cmd = "${pkgs.hyprlock}/bin/hyprlock"; + lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; unlock_cmd = "${pkgs.procps}/bin/pkill -USR1 hyprlock"; before_sleep_cmd = lock-session; after_sleep_cmd = "${hyprctl} dispatch dpms on";