Skip to content

Keyboard Backlight Control systemd service that turns backlight on when key pressed and turns it off on timeout. It refreshes the countdown timer if keys are still pressed.

License

Notifications You must be signed in to change notification settings

ruben2020/kbd_backlight_ctrl

Repository files navigation

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

About

Keyboard Backlight Control systemd service that turns backlight on when key pressed and turns it off on timeout. It refreshes the countdown timer if keys are still pressed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published