GithubHelp home page GithubHelp logo

diogenespolanco / l5p-keyboard-rgb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 4jx/l5p-keyboard-rgb

0.0 2.0 0.0 1.21 MB

Cross platform software to control the lighting of the 4 zone keyboard included in the 2020 and 2021 lineup of the Lenovo Legion laptops. Works on Windows and Linux.

Rust 99.87% C 0.13%

l5p-keyboard-rgb's Introduction

Preview

Preview

Index

Download

⚠️ Use at your own risk, the developer is not responsible for any damages that may arise as a result of using this program.

Builds will be periodically uploaded to the releases tab.

You may also download precompiled versions from here (requires github account) by clicking the latest entry with a ✅ and going under the "artifacts" section.

Available effects

All stock effects: Static, Breath, Smooth, LeftWave, RightWave.

Custon effects:

  • Lightning: Adds a little spark.
  • AmbientLight: Reacts to content on your screen.
  • Smooth(Left/Right)Wave: An implementation of the classic wave effect.
  • (Left/Right)Swipe: Transitions the selected colors from side to side, useful for custom waves.
  • Disco: A portable dance floor!

Usage

ℹ️ Note

If you are using the program on Linux, you'll need to run the program as root.

With GUI

Execute the file by double-clicking on it or running it from a console without arguments.

Via the command line

Usage:

$ legion-kb-rgb [OPTIONS] [SUBCOMMAND]

Examples:

  • Getting the help prompt
$ legion-kb-rgb --help
  • Setting the keyboard to red
$ legion-kb-rgb Static 255,0,0,255,0,0,255,0,0,255,0,0
  • Using the SmoothLeftWave with speed 4 and brightness at high
$ legion-kb-rgb -s 4 -b 2 SmoothLeftWave

Compatibility

This program has been tested to work on the 4 zone keyboard of the Legion 5 2020, Legion 5 2021 and Legion 5 Pro models on both Windows and Linux.

"How about X model"

  • Legion 7(i): Won't work, the backlight on these is per-key and uses a different way of communicating.
  • Any variant with a white backlight: Havent figured out how to talk to this one yet, but given the limited number of states (off, low, high) there's not many effects I'd be able to add anyways.

Building from source

Prequisites

  • Rust
  • Git
  • On Linux, you'll need additional dependencies:

Ubuntu

$ sudo apt-get update && sudo apt-get install -y libpango1.0-dev libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libudev-dev nasm libxcb-randr0-dev libusb-1.0-0-dev libdbus-1-dev

EndeavourOS (Arch Linux)

$ sudo pacman -S nasm cmake

Using cargo-make

Works on both Windows and Linux.

  • Install cargo-make
$ cargo install cargo-make
  • Clone the repository
$ git clone https://github.com/4JX/L5P-Keyboard-RGB.git
  • Build the project
$ cd L5P-Keyboard-RGB/
$ cargo make build
# Or
$ cargo make build-release

Building manually

  • Download and bootstrap VCPKG
    • You'll need to set an enviorement variable called VCPKG_INSTALLATION_ROOT pointing to the directory where you downloaded and bootstrapped VCPKG.

Windows

  • Download the necessary dependencies
> vcpkg update && vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static
  • Clone the repository
> git clone https://github.com/4JX/L5P-Keyboard-RGB.git
  • Build the project
> cd L5P-Keyboard-RGB/
> cargo build --release

Linux

  • Download the necessary dependencies
$ vcpkg update && vcpkg install libvpx libyuv
  • Clone the repository
$ git clone https://github.com/4JX/L5P-Keyboard-RGB.git
  • Build the project
$ cd L5P-Keyboard-RGB/
$ cargo build --release

Crashes, freezes, etc

I cannot guarantee this solution will work for anyone but myself. That being said feel free to open an issue if you encounter any of these problems on the issues tab.


Thanks to legendk95#0574 (272711294338072577) over at discord for initially reverse engineering the way to talk to the keyboard.

l5p-keyboard-rgb's People

Contributors

4jx avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.