# General Settings
general {
    lock_cmd = ~/.local/bin/video_lock.sh
    before_sleep_cmd = loginctl lock-session
    after_sleep_cmd = hyprctl dispatch dpms on
}

# Bajar brillo después de 2.5 minutos
listener {
    timeout = 100
    on-timeout = brightnessctl --device=amdgpu_bl1 -s set 10
    on-resume = brightnessctl --device=amdgpu_bl1 -r
}

# Apagar teclado después de 2.5 minutos (opcional)
listener { 
    timeout = 100
    on-timeout = brightnessctl -sd 'asus::kbd_backlight' set 0
    on-resume = brightnessctl -rd 'asus::kbd_backlight'
}

# Ejecutar bloqueo con video antes de apagar la pantalla
listener {
    timeout = 180
    on-timeout = bash -c "! pgrep -x mpv > /dev/null && ~/.local/bin/video_lock.sh"
}

# Apagar pantalla después de 5 minutos
listener {
    timeout = 300
    on-timeout = hyprctl dispatch dpms off
    on-resume = hyprctl dispatch dpms on
}

# Suspender después de 30 minutos
listener {
    timeout = 1000
    on-timeout = systemctl suspend
}

