tweaks to make hypridle only logout and lock if on laptop

This commit is contained in:
Chris Cochrun 2024-10-02 10:42:40 -05:00
parent 50be183de9
commit b6fe020ff3

View file

@ -62,22 +62,23 @@ in
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore. on-resume = brightnessctl -r # monitor backlight restore.
} }
${if laptop then ''
listener { listener {
timeout = 300 # 5min timeout = 300 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed on-timeout = loginctl lock-session # lock screen when timeout has passed
} }
'' else ""}
listener { listener {
timeout = 330 # 5.5min timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed 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. on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
} }
${if laptop then ''
listener { listener {
timeout = 1800 # 30min timeout = 1800 # 30min
on-timeout = systemctl suspend # suspend pc on-timeout = systemctl suspend # suspend pc
} }
'' else ""}
''; '';
}; };
home.file.".config/hypr/hyprpaper.conf" = { home.file.".config/hypr/hyprpaper.conf" = {