Coder Social home page Coder Social logo

blue-sauce / kbd_backlight_ctrl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruben2020/kbd_backlight_ctrl

0.0 0.0 0.0 75 KB

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: BSD 2-Clause "Simplified" License

Makefile 18.93% C 75.41% Shell 5.66%

kbd_backlight_ctrl's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.