Simple C program to control the keyboard backlight on the Lenovo Legion Y720.
This repository has been archived on 2026-04-25. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Makefile 45.4%
  • C 40%
  • Shell 9%
  • Dockerfile 3.9%
  • CMake 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
1337 65518adbb4
Merge pull request #4 from vgaetera/compiler-warning-fix
fix: compiler warning about different integer signedness
2023-02-08 08:54:49 +02:00
files fixed config selection 2022-07-01 12:32:28 +03:00
packages feat/fix: improve makefile, package build scripts, rpm spec 2023-02-07 22:07:44 +03:00
src fix: compiler warning about different integer signedness 2023-02-08 01:38:35 +03:00
.clang-format rewrote the whole tool 2021-12-01 01:11:56 +02:00
.gitignore rewrote the whole tool 2021-12-01 01:11:56 +02:00
.travis.yml Removed the old makefile, started using docker in travis 2021-09-29 01:25:19 +03:00
CMakeLists.txt rewrote the whole tool 2021-12-01 01:11:56 +02:00
LICENSE Initial commit 2021-04-26 22:27:00 +03:00
Makefile feat/fix: improve makefile, package build scripts, rpm spec 2023-02-07 22:07:44 +03:00
README.md Rewrote the entire makefile 2021-09-29 01:16:56 +03:00

Legion-Y720-Keyboard-Backlight


GitHub Travis (.com) Last commit Commits since latest Downloads


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