Skip to main content

A small utility for handling RGB keyboard light on some lenovo laptops.

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

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.16.tar.gz (12.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: keylightctl-0.1.16.tar.gz
  • Upload date:
  • Size: 12.2 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.16.tar.gz
Algorithm Hash digest
SHA256 1ee581631a2014d191c3cde79d82b9488cbf7644d74e4b3617721609f98fe4d1
MD5 28ade3805dd6a0d46d6dc8e5f5e621be
BLAKE2b-256 f3f2401c9a68456a86cf2b1f0d9e180e9c3b826f9eab42edb096746ab22f6f02

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