general { lock_cmd = pidof hyprlock || hyprlock before_sleep_cmd = loginctl lock-session after_sleep_cmd = hyprctl dispatch dpms on # avoid having to press a key twice to turn on display } # Turn the screen off after 30 seconds on the lock-screen listener { timeout = 30 on-timeout = pidof hyprlock && hyprctl dispatch dpms off on-resume = hyprctl dispatch dpms on }