Simple and extensible utility for controlling RGB keyboard lightning.
Project description
WIP: Now only some Lenovo laptops are supported, looking for other implementations and testers! Tested on linux systems.
Keylightctl - RGB Keyboard Light Controller
Simple and extensible utility for controlling RGB keyboard lightning.
Features
- define templates for keyboard lightning
- set different options separately (others are remembered)
- restore last options when turning on
- disable/enable keyboard lightning (only disables this program)
- set temporary options (eg.: for warning), these can be reset to the remembered options
Installaton
IN PROGRESS
check the requirements section of your controller and make sure everything is working!
Supported Models
There are different controllers for different devices. The controllers define the available options (eg.: colors, speed, effect, ...).
| Controller Name | Description | Compatible Models |
|---|---|---|
| lenovo | Based on InstinctEx's lenovo-ideapad-legion-keyboard-led project. It uses pyusb. | Lenovo Ideapad Gaming 3 or Legion 5 Pro |
Configuration
Keylightctl expects configuration file in $HOME/.config/keylightctl/config.toml. You can specify other locations using the keylightctl -C CONFIG flag.
Controller
Choosing controller to use (you MUST set this):
[controller]
active_controller = "lenovo"
Controller specific configurations:
[controller.lenovo]
usb_vendor = "0x048D"
usb_product = "0xC963"
Defining templates
Everything except description is an option provided by controllers.
[template.choose_a_name]
description = "white"
effect = "static"
colors = ["ffffff"]
Usage
# Turn on/off:
keylightctl turn ON/OFF
# Toggle on/off:
keylightctl toggle
Check out the usage section of your controller, for the available options of set command and templates:
Templates
# Activate a template:
keylightctl template [TEMPLATE_NAME]
# List templates:
keylightctl list
Others
# Disable/Enable
keylightctl disable/enable
# Show the current options
keylightctl show
# Show the details of a template
keyligthctl show TEMPLATE_NAME
If you are using keylightctl --no-persist flag, the new options won't be remembered (either using set or template) and turn on will reset to the saved options.
Tips
I you find a good usecase, feel free to share!
Warning light
- Create a template which flashes the keyboard in red.
- Run
keylightctl --no-persist template WARNING_TEMPLATE_NAMEto warn you - Reset it back to previous using
keylight turn on
Notifications
Something similar to the previous triggered by notifications.
Use keybindings
You can you keybindings based on templates.
Turn on keyboard lightning periodacially
You can create a cron job for example to turn on your keyboard lightning at night.
You may use weather data, integrate with system dark/light mode, etc.
Disable/ Enable for idle management
You can do something like this in hypridle.conf for example:
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
listener {
timeout = 150 # 2.5min.
on-timeout = keylight disable
on-resume = keylight enable
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file keylightctl-0.1.24.tar.gz.
File metadata
- Download URL: keylightctl-0.1.24.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58061c9dd978117bd12092704ed25a6cd37f8c7c4300f9de31988dd539f32728
|
|
| MD5 |
f7249cae6192b6f09df1fe06eac43893
|
|
| BLAKE2b-256 |
93809b43c83850c39ef83a1a2789031901525754436d3bd2278ae299f8903dfb
|