general {
    lock_cmd = pidof hyprlock || hyprlock       # Avoid starting multiple hyprlock instances
    before_sleep_cmd = loginctl lock-session    # Lock before suspend
    after_sleep_cmd = hyprctl dispatch dpms on  # To avoid having to press a key twice to turn on the display
}

listener {
    timeout = 60                                                 # 1 minute
    on-timeout = brightnessctl -sd platform::kbd_backlight set 0 # Turn off keyboard backlight
    on-resume = brightnessctl -rd platform::kbd_backlight        # Turn on keyboard backlight
}

listener {
    timeout = 180                                # 3 minutes
    on-timeout = brightnessctl -s set 1%         # Set monitor backlight to minimum
    on-resume = brightnessctl -r                 # monitor backlight restore
}

listener {
    timeout = 600                                 # 10 minutes
    on-timeout = loginctl lock-session            # Lock screen when timeout has passed
}

listener {
    timeout = 610                                 # 10 minutes, 10 seconds
    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
}

# listener {
#     timeout = 1200                                # 20 minutes
#     on-timeout = systemctl suspend                # Suspend pc
# }
