From d1755073312f87a44ae99bd58ab6c8822d77c46f Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 30 Jul 2024 15:46:08 -0400 Subject: [PATCH] hyprland,sway: pass "lock 'swaylock'" to swayidle so loginctl lock-session works --- homeManagerModules/desktop/hyprland/scripts.nix | 2 +- homeManagerModules/desktop/sway/scripts.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeManagerModules/desktop/hyprland/scripts.nix b/homeManagerModules/desktop/hyprland/scripts.nix index a9ac46f0..802023bf 100644 --- a/homeManagerModules/desktop/hyprland/scripts.nix +++ b/homeManagerModules/desktop/hyprland/scripts.nix @@ -46,7 +46,7 @@ in { ]; in pkgs.writeShellScript "hyprland-idled" - "${lib.getExe pkgs.swayidle} -w ${lib.strings.concatStringsSep " " (timeouts ++ beforeSleeps)}"; + "${lib.getExe pkgs.swayidle} -w lock '${lib.getExe pkgs.swaylock}' ${lib.strings.concatStringsSep " " (timeouts ++ beforeSleeps)}"; tablet = pkgs.writeShellScript "hyprland-tablet" '' STATE=`${lib.getExe pkgs.dconf} read /org/gnome/desktop/a11y/applications/screen-keyboard-enabled` diff --git a/homeManagerModules/desktop/sway/scripts.nix b/homeManagerModules/desktop/sway/scripts.nix index 952b7cc1..aced7f9d 100644 --- a/homeManagerModules/desktop/sway/scripts.nix +++ b/homeManagerModules/desktop/sway/scripts.nix @@ -27,5 +27,5 @@ in { ]; in pkgs.writeShellScript "sway-idled" - "${lib.getExe pkgs.swayidle} -w ${lib.strings.concatStringsSep " " (timeouts ++ beforeSleeps)}"; + "${lib.getExe pkgs.swayidle} -w lock '${lib.getExe pkgs.swaylock}' ${lib.strings.concatStringsSep " " (timeouts ++ beforeSleeps)}"; }