mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
hypridle: Dim the screen & keyboard backlight
This commit is contained in:
parent
4b37fb8fb3
commit
9931adaec5
|
@ -14,6 +14,22 @@ listener {
|
||||||
on-resume = hyprctl dismissnotify 1
|
on-resume = hyprctl dismissnotify 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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"'
|
||||||
|
}
|
||||||
|
|
||||||
# Lock the session
|
# Lock the session
|
||||||
listener {
|
listener {
|
||||||
timeout = 310
|
timeout = 310
|
||||||
|
|
Loading…
Reference in a new issue