chore: adjust keyboard backlight via hypridle

This commit is contained in:
Ryan Yin
2025-08-20 00:00:18 +08:00
parent 64a7b2c6cf
commit 09fbea3f77

View File

@@ -1,4 +1,3 @@
general { general {
lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances
before_sleep_cmd = loginctl lock-session # lock before suspend before_sleep_cmd = loginctl lock-session # lock before suspend
@@ -6,12 +5,13 @@ general {
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests
} }
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight. listener {
# listener { timeout = 180 # 3 minutes
# timeout = 180 # 3 minutes # List devices: brightnessctl --list
# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. # Adjust keyboard backlight: brightnessctl -d kbd_backlight set 50%
# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. 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 { # listener {
# timeout = 600 # 10min. # timeout = 600 # 10min.
@@ -20,13 +20,13 @@ general {
# } # }
listener { listener {
timeout = 1200 # 20 minutes timeout = 1600 # 20 minutes
on-timeout = pidof swaylock || swaylock # lock screen on-timeout = pidof swaylock || swaylock # lock screen
on-resume = hyprctl dispatch dpms on # monitor wake up on-resume = hyprctl dispatch dpms on # monitor wake up
} }
listener { listener {
timeout = 1260 # 21 minutes timeout = 1660 # 31 minutes
on-timeout = hyprctl dispatch dpms off # screen off on-timeout = hyprctl dispatch dpms off # screen off
on-resume = hyprctl dispatch dpms on && brightnessctl -r # monitor wake up & screen on on-resume = hyprctl dispatch dpms on && brightnessctl -r # monitor wake up & screen on
} }