Files
nix-config/home/linux/gui/base/desktop/conf/hypridle.conf
2025-08-20 00:03:25 +08:00

38 lines
1.6 KiB
Plaintext

general {
lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances
before_sleep_cmd = loginctl lock-session # lock before suspend
after_sleep_cmd = hyprctl dispatch dpms on # resume dpms after suspend
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests
}
listener {
timeout = 180 # 3 minutes
# List devices: brightnessctl --list
# Adjust keyboard backlight: brightnessctl -d kbd_backlight set 50%
on-timeout = brightnessctl --save --device=kbd_backlight set 0 # turn off keyboard backlight.
on-resume = brightnessctl --restore --device=kbd_backlight # turn on keyboard backlight.
}
# listener {
# timeout = 600 # 10min.
# on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = brightnessctl -r # monitor backlight restore.
# }
listener {
timeout = 1600 # 20 minutes
on-timeout = pidof swaylock || swaylock # lock screen
on-resume = hyprctl dispatch dpms on # monitor wake up
}
listener {
timeout = 1660 # 31 minutes
on-timeout = hyprctl dispatch dpms off # screen off
on-resume = hyprctl dispatch dpms on && brightnessctl -r # monitor wake up & screen on
}
# listener {
# timeout = 1800 # 30min
# on-timeout = systemctl suspend # suspend pc
# }