summaryrefslogtreecommitdiffstats
path: root/roles/hyprland/templates/hypr/hypridle.conf.j2
blob: e99b93bee7bf1ad8c4883761274f0c0cd0f7a1b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# vim: set filetype=hyprlang.ansible :

general {
    lock_cmd = pidof hyprlock || hyprlock
    before_sleep_cmd = /etc/hypr/scripts/power.sh --lock
    after_sleep_cmd = hyprctl dispatch dpms on
}

# Lock the screen (after 5 minutes)
listener {
    timeout = 300
    on-timeout = /etc/hypr/scripts/power.sh --lock
}

# Turn off screen (after 10 minutes)
listener {
    timeout = 600
    on-timeout = hyprctl dispatch dpms off
    on-resume = hyprctl dispatch dpms on
}

# Suspend the system (after 15 minutes)
listener {
    timeout = 900
    on-timeout = /etc/hypr/scripts/power.sh --hibernate
}