summaryrefslogtreecommitdiff
path: root/dot-config/hypr/hypridle.conf
blob: b4ec0411310b69203545e0bc360ff66033755aa4 (plain)
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
27
28
29
30
31
general {
  lock_cmd = pidof hyprlock || hyprlock      # avoid starting multiple hyprlock instances. before_sleep_cmd = loginctl lock-session    # lock before suspend.
  on_lock_cmd = $HOME/scripts/hypridle.sh --idle
  unlock_cmd = killall -q -s SIGUSR1 hyprlock
  on_unlock_cmd = $HOME/scripts/hypridle.sh --stopidle

  before_sleep_cmd = loginctl lock-session    # lock before suspend.
  after_sleep_cmd = $HOME/scripts/hypridle.sh --stopidle; hyprctl dispatch dpms on  # to avoid having to press a key twice to turn on the display.

  ignore_dbus_inhibit = true
  ignore_systemd_inhibit = true
}

# listener {
#     timeout = 300 # 5min
#     on-timeout = loginctl lock-session # lock the screen.
# }

listener {
  timeout = 900000 # 15min
  on-timeout = loginctl lock-session
  on-resume = $HOME/scripts/hypridle.sh --stopidle
}

listener {
  timeout = 1800000 # 30min
  # on-timeout = hyprctl dispatch dpms off
  on-timeout = systemctl suspend
  on-resume = hyprctl dispatch dpms on
}