Skip to content

Generate a customizable RGB wave effect for your Razer keyboard on Linux !

License

Notifications You must be signed in to change notification settings

Teskann/razer-waver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Razer Waver 🌊

Generate a customizable RGB wave effect for your Razer keyboard on Linux ! 🌈

Table of Contents

Why Razer Waver ?

OpenRazer does not provide a duration parameter for the wave effect on keyboards. The default speed is kind of high on multiple devices and it would be cool to slow it down a bit. (read more). Polychromatic provides an effect editor where you can create your own animations for your keyboard, including a wave. However, this can be long to setup by hand. Use Razer Waver to create it in a second !

How to use it ?

Prerequisites

  • Install Python 3.6+
  • Install OpenRazer (required for polychromatic).
  • Install polychromatic to configure your keyboard.

You will probably need to launch Polychromatic once before going to the next step.

Get Razer Waver

git clone https://github.com/Teskann/razer-waver
cd razer-waver

Create the wave effect

python create-wave.py  # This creates the default wave effect. Click below to customize it

NB: on some old systems, you might need to call python3 instead of python

I want to customize the wave !

Apply the wave effect

Run polychromatic and click on the Effects tab.

There you should see a new Wave effect. Click on it and click on Play !

Customize

You can customize your wave using the following parameters :

usage: create-wave.py [-h] [-d DURATION] [-D DIRECTION] [--fps FPS]
                      [-c COLUMNS] [-r ROWS] [--device DEVICE] [-o OUTPUT]

Generate an RGB wave effect for polychromatic.

optional arguments:
  -h, --help            show this help message and exit
  -d DURATION, --duration DURATION
                        Wave period in seconds. Default is 5.
  -D DIRECTION, --direction DIRECTION
                        Wave direction. `LR` for left to right, `RL` for right
                        to left. Default is `LR`
  --fps FPS             Frames per seconds of the wave. Defaults to 24.
  -c COLUMNS, --columns COLUMNS
                        Number of columns in the keyboard. Default is 22.
  -r ROWS, --rows ROWS  Number of rows in the keyboard. Default is 6.
  --device DEVICE       Name of the Razer device. Defaults to `Razer Ornata
                        V2`. Please, enter the real name of the device, as it
                        shows up in Polychromatic. You will probably need to
                        fix the number of rows and columns so they fit your
                        device, using `-r` and `-c` parameters. To know how
                        many columns and rows your device has, you can create
                        a dummy Polychromatic effect and check how many
                        rows/columns appear in the matrix. Underglow should be
                        supported with the correct values. If your device name
                        contains whitespaces, don't forget to add quotes
                        around it.
  -o OUTPUT, --output OUTPUT
                        Output file path. Default is
                        `~/.config/polychromatic/effects/wave.json`

Examples

Generate the default wave, with a duration of 5 seconds, from left to right :

python create-wave.py

Generate a 15 seconds wave from right to left:

python create-wave.py -d 15 -D RL

Generate a 1 second wave at 60 FPS:

python create-wave.py -d 1 --fps 60

Technical details

The wave is a hue periodic rotation with full saturation and lightness. Every column of the keyboard has a different phase shift which gives the illusion the colors are moving.

Note: This effect is computed by polychromatic software, not by the keyboard itself ! Thus, this may use more or less CPU, depending on your computer and on the wave settings.

Compatibility

This should work with any Razer keyboard and any Linux distribution. However, this has only been tested on:

Software Version
Linux Distribution Ubuntu 20.04
Python 3.8.10
polychromatic 0.7.0, 0.7.2
Qt 5.14.1
Hardware Device
Keyboard Razer Ornata V2
Keyboard Razer Huntsman Elite (9 rows needed to support underglow)
Keyboard Razer BlackWidow V4

About

Generate a customizable RGB wave effect for your Razer keyboard on Linux !

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages