From b6fe020ff3ee760f256d10b87f4ce2c9d5433183 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 2 Oct 2024 10:42:40 -0500 Subject: [PATCH] tweaks to make hypridle only logout and lock if on laptop --- home/modules/hyprland.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home/modules/hyprland.nix b/home/modules/hyprland.nix index d39e226..a11d118 100644 --- a/home/modules/hyprland.nix +++ b/home/modules/hyprland.nix @@ -62,22 +62,23 @@ in on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. on-resume = brightnessctl -r # monitor backlight restore. } - + ${if laptop then '' listener { timeout = 300 # 5min on-timeout = loginctl lock-session # lock screen when timeout has passed } - + '' else ""} listener { timeout = 330 # 5.5min on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. } - + ${if laptop then '' listener { timeout = 1800 # 30min on-timeout = systemctl suspend # suspend pc } + '' else ""} ''; }; home.file.".config/hypr/hyprpaper.conf" = {