# 1. Dim the screens first (after 4.5 minutes)
timeout 270 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors'

# 2. Lock the screen (after 5 minutes)
timeout 300 'hyprlock'

# 3. Turn off screens immediately if already locked (failsafe)
timeout 310 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors'

# 4. Lock immediately before the computer goes to sleep/suspend
before-sleep 'hyprlock'
