Last active
March 10, 2020 18:23
-
-
Save evanjs/c8b28ef3ee29a3d65874add5818c9c51 to your computer and use it in GitHub Desktop.
Disable LEDs for all connected Razer devices using openrazer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -p "python37.withPackages(ps: with ps; [ openrazer ])" -p openrazer-daemon -i python3 | |
from openrazer.client import DeviceManager | |
from openrazer.client import constants as razer_constants | |
device_manager = DeviceManager() | |
device_manager.sync_effects = False | |
print(f"Found {len(device_manager.devices)} devices") | |
for device in device_manager.devices: | |
print(f"Setting FX for {device.name} to none") | |
device.fx.none() | |
# We can accomplish the same thing by setting the brightness to zero | |
# print(f"Turning off LEDs for {device.name}") | |
# device.brightness = 0 | |
# If sync_effects is enabled, we only need to turn off one device, and the rest will follow | |
# print(f"Turning off LEDs for all connected devices") | |
# device_manager.devices[0].brightness = 0 | |
# or | |
# device_manager.devices[0].fx.none() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment