2024-02-19 00:01:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
general {
|
2024-03-05 10:16:53 +00:00
|
|
|
#lock_cmd = swaylock -fF # handled by systemd-lock-handler
|
2024-02-19 00:01:07 +00:00
|
|
|
unlock-cmd = killall -s SIGUSR1 swaylock # same as above, but unlock
|
2024-03-05 10:16:53 +00:00
|
|
|
|
2024-02-19 00:01:07 +00:00
|
|
|
before_sleep_cmd = loginctl lock-session && sleep 2
|
|
|
|
ignore_dbus_inhibit = false
|
|
|
|
}
|
|
|
|
|
|
|
|
# Warn about going idle (5 mins)
|
|
|
|
listener {
|
|
|
|
timeout = 300
|
2024-03-05 10:17:01 +00:00
|
|
|
# use hyprland notifications, in case dunst notifs are paused or whatever
|
|
|
|
on-timeout = hyprctl notify 0 10000 "rgb(ff0000)" "System going idle in 10 seconds..."
|
|
|
|
# TODO: Add dismissing once https://github.com/hyprwm/Hyprland/pull/4790 is merged
|
2024-02-19 00:01:07 +00:00
|
|
|
}
|
|
|
|
|
2024-03-05 10:17:01 +00:00
|
|
|
# Turn off the screen for 5 seconds
|
|
|
|
# I sometimes don't notice the notification, this I always notice
|
|
|
|
# and can easily dismiss. However the screen will be turned back on
|
|
|
|
# once locked, only turning it off for longer later, since I like
|
|
|
|
# seeing my lock screen. Yeah, it's a mess.
|
2024-02-19 00:01:07 +00:00
|
|
|
listener {
|
|
|
|
timeout = 310
|
2024-03-05 10:17:01 +00:00
|
|
|
on-timeout = hyprctl dispatch dpms off
|
|
|
|
on-resume = hyprctl dispatch dpms on
|
|
|
|
}
|
|
|
|
|
|
|
|
# Lock the session & disable dunst notifications & turn screen back on
|
|
|
|
listener {
|
|
|
|
timeout = 315
|
|
|
|
on-timeout = hyprctl dispatch dpms on && loginctl lock-session && dunstctl set-paused true
|
2024-02-19 00:01:07 +00:00
|
|
|
on-resume = dunstctl set-paused false
|
|
|
|
}
|
|
|
|
|
2024-03-05 10:17:01 +00:00
|
|
|
# Turn off the screen after another 45s
|
2024-02-19 00:01:07 +00:00
|
|
|
listener {
|
2024-03-05 10:17:01 +00:00
|
|
|
timeout = 400
|
2024-02-19 00:01:07 +00:00
|
|
|
on-timeout = hyprctl dispatch dpms off
|
|
|
|
on-resume = hyprctl dispatch dpms on
|
|
|
|
}
|
|
|
|
|
|
|
|
# Enter suspend/sleep state (10 mins)
|
|
|
|
# On low battery, or after HibernateDelaySec (/etc/systemd/sleep.conf), the system
|
|
|
|
# will enter full hibernation
|
|
|
|
listener {
|
|
|
|
timeout = 600,
|
|
|
|
on-timeout = systemctl suspend-then-hibernate
|
|
|
|
}
|
2024-02-19 00:29:39 +00:00
|
|
|
|
|
|
|
# vi: ft=hyprlang
|