Skip to main content

Control Razer devices from the command line

Project description

razer-cli

Command line interface for controlling Razer devices on Linux

About

With 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 with pywal. Then this tool will set your Razer colors to Pywal's colors. See below for more information.

Installation

pip install razer-cli

Usage

$ razer-cli -h
usage: razer-cli [-h] [-e EFFECT] [-v] [-c COLOR [COLOR ...]] [-l] [-ll] [-a]
                 [-d DEVICE [DEVICE ...]] [--dpi DPI]

optional arguments:
  -h, --help            show this help message and exit
  -e EFFECT, --effect EFFECT
                        set effect
  -v, --verbose         increase output verbosity
  -c COLOR [COLOR ...], --color COLOR [COLOR ...]
                        choose color (default: X color1), use one argument for
                        hex, or three for base10 rgb
  -l, --list_devices    list available devices and their supported effects
  -ll, --list_devices_long
                        list available devices and all their capabilities
  -a, --automatic       try to find colors and set them to all devices without
                        user arguments, uses X or pywal colors
  -d DEVICE [DEVICE ...], --device DEVICE [DEVICE ...]
                        only affect these devices, same name as output of -l
  --dpi DPI             set DPI of device

This might be out of date, just run it with -h yourself to see the newest options.

Example usage with Pywal

To get your mouse and keyboard to use Pywal's colors, simply start razer-cli with the -a flag, after having executed wal: razer-cli -a
Example in action here.

Other examples

$ razer-cli -e ripple -c ff0000
$ razer-cli -e static -c ffffff

You can also leave out the color or the effect:
$ razer-cli -e breath_single
$ razer-cli -c 55ff99

Currently this will imply the -a flag 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.

Other symbiosis tools

Dependencies

  • openrazer
    • :warning: Do not install openrazer from pip, which is something else.
    • Instead install it from one of the various package managers of your distribution.
  • xrdb
    • Also available on most distros.

Disclaimer

Not 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 GUIs Polychromatic, RazerGenie or RazerCommander which have specific implementations for most devices.

Feel free to open feature request issues or PRs.

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

razer-cli-1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

razer_cli-1.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file razer-cli-1.1.tar.gz.

File metadata

  • Download URL: razer-cli-1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.2

File hashes

Hashes for razer-cli-1.1.tar.gz
Algorithm Hash digest
SHA256 f1ba6c95b702c162e61fe05633a4fad8d6bf72ab46edc1b5eb8f30b7cfb91633
MD5 ba9fe56a3eb1cd5d485fc01386ad3eef
BLAKE2b-256 d7c1a34e0c77db6da7fdd7d0bfb217e521577baf9a2127078a72557a0236909d

See more details on using hashes here.

File details

Details for the file razer_cli-1.1-py3-none-any.whl.

File metadata

  • Download URL: razer_cli-1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.2

File hashes

Hashes for razer_cli-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2b9089dbd5fdb934d482581d486db31745e33d637faee69fd04a2e3d8fb495f
MD5 6013d0634b4fb414af9392f1b7997222
BLAKE2b-256 652fe61fcb396a0fbd40e98e3a87513a91b51c65bd6ae76634bd694a7911d511

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