A small script to get or set the keyboard backlight via UPower (for LXQt on X11).
- Copy the script to
~/.local/bin - Ensure
~/.local/binis in yourPATH(add to~/.profileor~/.bashrcif needed).
- Increase keyboard backlight by 15:
kbd_backlight +15 - Decrease keyboard backlight by 15:
kbd_backlight -15 - Set an absolute keyboard backlight value (integer):
kbd_backlight 150
- Open LXQt Global Actions (lxqt-config-globalkeyshortcuts).
- Create a keyboard shortcut to increase backlight, command:
kbd_backlight +15 - Create a keyboard shortcut to decrease backlight, command:
kbd_backlight -15
- The script requires gdbus and access to the system D-Bus org.freedesktop.UPower KbdBacklight object.
- Argument must be an integer, optionally prefixed with + or - for relative changes.
- The value will be clamped to the device-supported range.