dotfiles/.config/hypr/hypridle.conf
2024-08-20 01:04:42 +02:00

24 lines
612 B
Text

$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 = loginctl lock-session
}
listener {
timeout = 301
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 600
on-timeout = grep -qs "true" .config/hypr/enable_sleep.conf || exit 0 ; playerctl status -s | grep -qv 'Playing' && systemctl sleep || playerctl status -s | grep -q '.*' || systemctl sleep # Only go to sleep if nothing is playing
}