Keyboard Backlight Control is a systemd service that turns the backlight on when any key is pressed and turns it off on timeout.
It refreshes the countdown timer if keys are still pressed.
The default countdown period is 60 seconds.
This only works on Linux and has been tested on Arch Linux and Ubuntu Linux.
For other Linux distributions, you may need to change the following:
- The executable's binary install path of
/usr/local/binin Makefile andkbd_backlight_ctrl.service - The systemd .service file install path of
/usr/lib/systemd/systemin Makefile - The
DBUS_SESSION_BUS_ADDRESSenvironment variable inkbd_backlight_ctrl.service - The keyboard input events device in
kbd_backlight_ctrl.service, at the line which definesKBD_BACKLIGHT_CTRL_INDEVICE.
You can configure the timeout period in kbd_backlight_ctrl.service, at the line which defines KBD_BACKLIGHT_CTRL_TIMEOUT.
The dependencies for building are:
- dbus
To build and install the binary, run these commands:
make
sudo make installTo uninstall the binary, run this command:
sudo make uninstallTo install to systemd, run this command:
sudo make systemd_installTo uninstall from systemd, run this command:
sudo make systemd_uninstallTo clean all build products, run this command:
make clean