Skip to main content

Simple and extensible utility for controlling RGB keyboard lightning.

Project description

DALL-E Generated Glowing RGB keyboard

WIP: Now only some Lenovo laptops are supported, looking for other implementations and testers! Tested on linux systems.

Keylightctl - RGB Keyboard Light Controller PyPI version

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

see the example config.toml

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

  1. Create a template which flashes the keyboard in red.
  2. Run keylightctl --no-persist template WARNING_TEMPLATE_NAME to warn you
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keylightctl-0.1.23.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file keylightctl-0.1.23.tar.gz.

File metadata

  • Download URL: keylightctl-0.1.23.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

Hashes for keylightctl-0.1.23.tar.gz
Algorithm Hash digest
SHA256 dd1e28d858141eee6f100cd6dbbf56f39e38ad022fc2e948d75cef0d9fdc4fdc
MD5 0677ffe467b9278a4f3350c4070f85af
BLAKE2b-256 1e1683f22477c808a127e505b32950d66eb1bbe6e17aae69b8fd874c2976f5f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page