2024-02-19 00:01:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
general {
|
2024-12-22 02:58:13 +00:00
|
|
|
before_sleep_cmd = loginctl lock-session
|
2024-02-19 00:01:07 +00:00
|
|
|
ignore_dbus_inhibit = false
|
2024-12-22 04:10:11 +00:00
|
|
|
ignore_systemd_inhibit = false
|
2024-02-19 00:01:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Warn about going idle (5 mins)
|
|
|
|
listener {
|
|
|
|
timeout = 300
|
2024-12-22 02:58:13 +00:00
|
|
|
# use hyprland notifications, in case regular notifs are paused or whatever
|
2024-03-13 23:38:53 +00:00
|
|
|
on-timeout = hyprctl notify 0 10000 "rgb(ff0000)" "fontsize:20 System going idle in 10 seconds..."
|
2024-03-10 03:42:19 +00:00
|
|
|
on-resume = hyprctl dismissnotify 1
|
2024-03-05 10:17:01 +00:00
|
|
|
}
|
|
|
|
|
2024-12-22 04:09:44 +00:00
|
|
|
# Dim the screen
|
|
|
|
listener {
|
|
|
|
timeout = 300
|
|
|
|
# Set the brightness to minimum (not exactly to 0 though for OLED screens)
|
|
|
|
on-timeout = brightnessctl -s set 10
|
|
|
|
on-resume = brightnessctl -r
|
|
|
|
}
|
|
|
|
|
|
|
|
# Turn off keyboard backlight
|
|
|
|
listener {
|
|
|
|
timeout = 300
|
|
|
|
# Attempt to find the keyboard backlight device, only proceeding if it exists
|
|
|
|
on-timeout = sh -c 'device=$(brightnessctl -l -m | grep -i kbd | cut -d"," -f1 | head -n 1) && [ -n "$device" ] && brightnessctl -s -d "$device" set 0'
|
|
|
|
on-resume = sh -c 'device=$(brightnessctl -l -m | grep -i kbd | cut -d"," -f1 | head -n 1) && [ -n "$device" ] && brightnessctl -r -d "$device"'
|
|
|
|
}
|
|
|
|
|
2024-12-22 02:58:13 +00:00
|
|
|
# Lock the session
|
2024-03-05 10:17:01 +00:00
|
|
|
listener {
|
2024-03-10 03:42:19 +00:00
|
|
|
timeout = 310
|
2024-12-22 02:58:13 +00:00
|
|
|
on-timeout = loginctl lock-session
|
2024-02-19 00:01:07 +00:00
|
|
|
}
|
|
|
|
|
2024-03-11 01:18:24 +00:00
|
|
|
# Turn off the screen after another 50s
|
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
|