https://github.com/myterminal/thinklucent
A simple implementation for automatic keyboard backlight in Linux for ThinkPad (and beyond)
https://github.com/myterminal/thinklucent
keyboard-backlight linux thinkpad
Last synced: 11 months ago
JSON representation
A simple implementation for automatic keyboard backlight in Linux for ThinkPad (and beyond)
- Host: GitHub
- URL: https://github.com/myterminal/thinklucent
- Owner: myTerminal
- License: mit
- Created: 2022-03-30T02:59:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T14:28:28.000Z (over 1 year ago)
- Last Synced: 2025-08-16T22:35:18.628Z (11 months ago)
- Topics: keyboard-backlight, linux, thinkpad
- Language: Makefile
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# thinklucent
[](https://lisp-lang.org)
[](https://opensource.org/licenses/MIT)
[](https://ko-fi.com/Y8Y5E5GL7)
A simple implementation for automatic keyboard backlight in Linux for ThinkPad (and beyond)
## Background
After using an Apple MacBook Pro for four years, I collected quite a few elements from my computing workflow in macOS and carried over most of them to my Linux setup. However, one of those that I couldn't get over to this side of the wall was automatic keyboard backlight. The backlight could be turned ON and OFF, but would stay at the same state or brightness level regardless of whether I was interacting with the computer. After a few failed attempts at implementing a simple script to achieve it in Bash and on Node.js and then later on with Rust, I figured Lisp could be the one, and hence comes *thinklucent*.
*thinklucent* has been initially designed to be a script that watches for keyboard (and other input) events to keep the keyboard backlight ON for a reasonable time interval and then automatically turn if OFF until the next user interaction.
## Installation
There are a few different ways to get *thinklucent*.
### Compile from source
# Clone project to the local workspace
git clone https://github.com/myTerminal/thinklucent.git
# Switch to the project directory
cd thinklucent
# Install with `make`
make install
### Automatic installation
Simply execute the below command in a terminal; the rest should be automatic.
/bin/bash -c "$(curl https://raw.githubusercontent.com/myTerminal/thinklucent/main/install)"
### Through a package manager
*thinklucent* will soon be available to install from your operating system's package manager.
## How to Use
A simple way to use *thinklucent* is to run it in a command-line terminal with no command arguments.
sudo thinklucent
It does need to be run as `root` so that it can work with keyboard backlight.
### Running as a service
*thinklucent* can also be run as an init service, and currently only supports [Runit](http://smarden.org/runit). Support for more init systems will be implemented soon.
### Further help with commands
To learn more about usage, refer to `manpage`:
man thinklucent
## Updating
In order to update *thinklucent*, simply run:
thinklucent-update
## Uninstalling
In order to uninstall *thinklucent*, simply run:
thinklucent-uninstall
## External Dependencies
Being written with Common Lisp, *thinklucent* depends on [SBCL](https://www.sbcl.org). In most cases, it will be automatically installed while generating the binary, but if it doesn't please install it before running the installation.
The other required programs are as follows:
- [libfixposix-dev](https://github.com/sionescu/libfixposix)
## Similar project(s)
- [tp-auto-kbbl](https://crates.io/crates/tp-auto-kbbl)
## To-do
* Add support for more init systems like OpenRC, SysVinit, etc.
* Support for more hardware