Package: razer-cli
razer-cliCommand line interface for controlling Razer devices on LinuxAboutWith this command line interface you can configure your Razer peripherals, such
as keyboard and mouse, set their colors and effects, etc.The most simple use case (for which this tool was originally developed) is to
use it in symbiosis withpywal. Then
this tool will set your Razer colors to Pywal's colors. See below for more
information.Installationpip install razer-cliORgit clone https://github.com/LoLei/razer-cli.git
cd razer-cli
sudo python setup.py installORgit clone https://github.com/LoLei/razer-cli.git
cd razer-cli
pip install . --userUsage$ razer-cli -h
usage: razer-cli [-h] [-man [MANUAL ...]] [-v] [-d DEVICE [DEVICE ...]]
                 [-a] [-e EFFECT [EFFECT ...]] [-c COLOR [COLOR ...]]
                 [-z ZONES [ZONES ...]] [-b BRIGHTNESS [BRIGHTNESS ...]]
                 [--dpi DPI] [--poll POLL]
                 [--battery BATTERY [BATTERY ...]] [-l] [-ll] [-ls]
                 [--sync] [--restore] [--version]

optional arguments:
  -h, --help            show this help message and exit
  -man [MANUAL ...], --manual [MANUAL ...]
                        Print help details for given feature(s)
  -v, --verbose         increase output verbosity
  -d DEVICE [DEVICE ...], --device DEVICE [DEVICE ...]
                        only affect these devices, same name as output of
                        -l
  -a, --automatic       try to find colors and set them to all devices
                        without user arguments, uses X or pywal colors
  -e EFFECT [EFFECT ...], --effect EFFECT [EFFECT ...]
                        set effect
  -c COLOR [COLOR ...], --color COLOR [COLOR ...]
                        choose color (default: X color1), use one argument
                        for hex, or three for base10 rgb
  -z ZONES [ZONES ...], --zone ZONES [ZONES ...]
                        choose zone for color(s)
  -b BRIGHTNESS [BRIGHTNESS ...], --brightness BRIGHTNESS [BRIGHTNESS ...]
                        set brightness of device
  --dpi DPI             set DPI of device (use print as a value to show
                        it)
  --poll POLL           set polling rate of device (use print as a value
                        to show it)
  --battery BATTERY [BATTERY ...]
                        set low threshold and/or idle delay (use print as
                        a value to show it)
  -l, --list_devices    list available devices, settings, and their
                        supported capabilities/effects
  -ll, --list_devices_long
                        list available devices settings, and list their
                        supported capabilities/effects
  -ls, --list_devices_short
                        list available devices and their settings
  --sync                sync lighting effects to all supported Razer
                        products
  --restore             Load last used settings
  --version             Print version numberThis might be out of date, just run it with-hyourself to see the newest
options.Example usage with PywalTo get your mouse and keyboard to use Pywal's colors, simply startrazer-cliwith the-aflag, after having executedwal:razer-cli -aExample in actionhere.Another option is to userazer-cli -e multicolor,xpalette, which not only
uses a single color from pywal, but uses the entire 16 color palette.Other examples$ razer-cli -e ripple -c ff0000$ razer-cli -e static -c ffffffYou can also leave out the color or the effect:$ razer-cli -e breath_single$ razer-cli -c 55ff99Currently this will imply the-aflag being used for the missing setting. I
plan on also having the option to reuse the current color/effect, if the
argument is missing, in the future.EffectsEffects are listed inrazer_cli/settings.py.
The effects that are supported per device can be listed withrazer-cli -l[l].
Some of the built-in effects or not implemented yet. If such an effect is
chosen, a notice will be logged. There are also custom effects that do not exist
normally, such asmulticolor, which is described in the same file.Here's a showcase of that effect:Other symbiosis toolswpgtkChameleonDependenciesopenrazer:warning: Do not installopenrazerfrompip, which is something else.Instead install it from one of the various package managers of your distribution.xrdbAlso available on most distros.DisclaimerNot all devices have been tested, but basic effects should work everywhere. Some guesswork is being done as to what capabilities are supported on specific devices. If you need more advanced configuration, consider using the GUIsPolychromatic,RazerGenieorRazerCommanderwhich have specific implementations for most devices.Feel free to open feature request issues or PRs.Contributors ✨Thanks goes to these wonderful people (emoji key):Ansis💻Kainoa Kanter🤔IFo Hancroft🐛📓📖GM-Script-Writer-62850💻Stephen Thomas-Dorin💻This project follows theall-contributorsspecification. Contributions of any kind welcome!