From e298eee2a1788e9ec00f71dc95dcff099468572f Mon Sep 17 00:00:00 2001 From: Emmet Date: Thu, 4 Apr 2024 16:59:18 -0500 Subject: [PATCH] Time and lid based autolocking --- user/wm/hyprland/hyprland.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 9fb3507..e6cf8a3 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -138,7 +138,8 @@ bind=SUPER,C,exec,wl-copy $(hyprpicker) bind=SUPERSHIFT,S,exec,systemctl suspend - bind=SUPERCTRL,L,exec,hyprlock + bindl=,switch:on:Lid Switch,exec,loginctl lock-session + bind=SUPERCTRL,L,exec,loginctl lock-session bind=SUPER,H,movefocus,l bind=SUPER,J,movefocus,d @@ -388,9 +389,13 @@ } listener { - timeout = 600 # in seconds + timeout = 300 # in seconds on-timeout = loginctl lock-session } + listener { + timeout = 600 # in seconds + on-timeout = systemctl suspend + } ''; home.file.".config/hypr/hyprlock.conf".text = '' background {