Change timings, only put device to sleep if noting is playing.

This commit is contained in:
Yannick7777 2024-08-19 23:52:05 +02:00
commit ffaa3ffc45

View file

@ -1,22 +1,24 @@
#general {
# lock_cmd = pidof hyprlock || hyprlock
# before_sleep_cmd = loginctl lock-session
# after_sleep_cmd = hyprctl dispatch dpms on
#}
#
#listener {
# timeout = 300
# on-timeout = loginctl lock-session
#}
#
#
#listener {
# timeout = 305
# on-timeout = hyprctl dispatch dpms off
# on-resume = hyprctl dispatch dpms on
#}
$lock_cmd = pidof hyprlock || hyprlock
general {
lock_cmd = $lock_cmd
before_sleep_cmd = $lock_cmd
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 300
on-timeout = systemctl sleep
on-timeout = loginctl lock-session
}
listener {
timeout = 330
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 600
on-timeout = playerctl status -s | grep -qv 'Playing' && systemctl sleep || playerctl status -s | grep -q '.*' || systelctl sleep # Only go to sleep if nothing is playing
}