general {
    lock_cmd = omarchy-system-lock                         # lock screen and 1password
    before_sleep_cmd = OMARCHY_LOCK_ONLY=true omarchy-system-lock    # lock before suspend without scheduling display off.
    after_sleep_cmd = sleep 1 && omarchy-system-wake                 # delay for PAM readiness, then turn on display.
    inhibit_sleep = 3                                      # wait until screen is locked
}

# Start screensaver after 10 minutes
listener {
    timeout = 1200
    on-timeout = pidof hyprlock || omarchy-launch-screensaver
}

# Lock system after 5 minutes (screensaver resets idle timer, so have to just do half + 2s margin)
listener {
    timeout = 2400
    on-timeout = omarchy-system-lock
    on-resume = omarchy-system-wake
}
