- Makefile 45.4%
- C 40%
- Shell 9%
- Dockerfile 3.9%
- CMake 1.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| files | ||
| packages | ||
| src | ||
| .clang-format | ||
| .gitignore | ||
| .travis.yml | ||
| CMakeLists.txt | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
Simple C program to control the keyboard backlight on the Lenovo Legion Y720 (should probably work on other laptops with the same keyboard)
It's literally this but written in C without a GUI for the minimalists and purists
Features
- Unlimited profiles
- Easy-ish configuration
- No GUI (terminal ftw)
- Written in C
➡ 🏗️ Build
$ make all
...
- Binary can be found in
build/release/kbd-backlight
➡ ✨ Install
$ sudo make all install postinstall
...
- Binary path is
/usr/local/bin/kbd-backlight - Configuration path is
/etc/kbd-backlight/backlight.conf
NOTE: Any user that should be able to control the backlight should be added to the kbd-backlight group (gpasswd -a [USER] kbd-backlight)
We now have an AppArmor profile for the binary, to install it do this:
$ sudo make apparmor
...
$ sudo aa-enforce /etc/apparmor.d/kbd-backlight
Usage
$ kbd-backlight
Usage: kbd-backlight [profile name] {config file}
{config file}: Specify another location for the config file (Optional)
Each user, who is in the kbd-backlight group, can now have their own personal config file with their own custom profiles. This config file must be manually created by the user with this command:
$ cp /usr/share/kbd-backlight/backlight.conf.default ~/.config/kbd-backlight.conf
The executable will automagically detect whether the user has their own config and load that instead of the system-wide one