r/bash • u/somniasum • 17h ago
help Keyboard Backlight control on Wayland, need help with Hyprland
Here is the github for the script: https://github.com/somniasum/wayland-backlight-led/blob/main/src/backlight.sh
Context
Since the switch from X11 to Wayland getting a keyboard's backlight led to light up has been a drag. With X11 it was as simple as xset led to turn on the led. So with wayland I wrote up a script to handle the led stuff. It has been working fine on Wayland WM's and works pretty much the same on X11 WM's too.
On hyprland keyboard led just turns off briefly but still stays on. I am starting to suspect maybe it has to do with the way Hyprland handles device states or some?
Do you think I have to change some things on it to solve the Hyprland exception?