31 lines · 673 B
# Hypridle configuration
# https://github.com/hyprwm/hypridle

general {
    lock_cmd = pidof hyprlock || hyprlock
    unlock_cmd =
    before_sleep_cmd = loginctl lock-session
    after_sleep_cmd = hyprctl dispatch dpms on
    ignore_dbus_inhibit = false
}

# Dim screen after 60s idle.
# Uses a helper script that picks brightnessctl (laptop) or ddcutil (external monitor).
listener {
    timeout = 60
    on-timeout = brightness-dim 30
    on-resume = brightness-dim restore
}

# Lock after 120s idle
listener {
    timeout = 120
    on-timeout = loginctl lock-session
}

# Suspend after 5 min idle (AC)
listener {
    timeout = 300
    on-timeout = systemctl suspend
}