Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.66 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.66 KB

Keyboard Backlight Control Service

Build Status Coverity Scan Build Status

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/bin in Makefile and kbd_backlight_ctrl.service
  • The systemd .service file install path of /usr/lib/systemd/system in Makefile
  • The DBUS_SESSION_BUS_ADDRESS environment variable in kbd_backlight_ctrl.service
  • The keyboard input events device in kbd_backlight_ctrl.service, at the line which defines KBD_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 install

To uninstall the binary, run this command:

sudo make uninstall

To install to systemd, run this command:

sudo make systemd_install

To uninstall from systemd, run this command:

sudo make systemd_uninstall

To clean all build products, run this command:

make clean