-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example scripts for daemon and Polychromatic profiles.
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Example script to set brightness of the keyboard. | ||
# | ||
|
||
import razer.daemon_dbus | ||
daemon = razer.daemon_dbus.DaemonInterface() | ||
|
||
# Accepts a value between 0 and 255. | ||
# | ||
# 0 0% Off | ||
# 128 50% Half Lit | ||
# 255 100% Fully Lit | ||
|
||
daemon.set_brightness(255) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Example script to set effects of the keyboard. | ||
# | ||
|
||
import razer.daemon_dbus | ||
daemon = razer.daemon_dbus.DaemonInterface() | ||
|
||
# Accepts the following (and additional parameters): | ||
# | ||
# No Effect 'none' | ||
# Spectrum 'spectrum' | ||
# Wave 'wave' [direction 0-2] | ||
# 0 = None | ||
# 1 = Right | ||
# 2 = Left | ||
# Reactive 'reactive', [speed, 1-3], [red, 0-255], [green, 0-255], [blue, 0-255] | ||
# 1 = Slow | ||
# 2 = Medium | ||
# 3 = Fast | ||
# Breath 'breath', [red, 0-255], [green, 0-255], [blue, 0-255], [red, 0-255], [green, 0-255], [blue, 0-255] | ||
# Static 'static', [red, 0-255], [green, 0-255], [blue, 0-255] | ||
|
||
daemon.set_effect('') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Example script to turn on or off game mode. | ||
# | ||
|
||
import razer.daemon_dbus | ||
daemon = razer.daemon_dbus.DaemonInterface() | ||
daemon.set_game_mode(True) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Example script to enable the macro keys. | ||
# | ||
|
||
import razer.daemon_dbus | ||
daemon = razer.daemon_dbus.DaemonInterface() | ||
daemon.marco_keys(True) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Example script to load a Polychromatic profile | ||
# | ||
|
||
import razer.daemon_dbus | ||
import polychromatic.profiles | ||
|
||
# Prepare the Razer daemon | ||
daemon = razer.daemon_dbus.DaemonInterface() | ||
|
||
# Load the Polychromatic profile and send to daemon | ||
profiles = polychromatic.profiles.ChromaProfiles(daemon) | ||
profiles.activate_profile_from_file("Name of Profile") |