Skip to content

Commit

Permalink
Add example scripts for daemon and Polychromatic profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
lah7 committed May 29, 2016
1 parent 29fc018 commit 03be59d
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/razer/set_brightness.py
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)
24 changes: 24 additions & 0 deletions scripts/razer/set_effect.py
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('')
8 changes: 8 additions & 0 deletions scripts/razer/set_game_mode.py
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)
8 changes: 8 additions & 0 deletions scripts/razer/set_macro.py
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)
14 changes: 14 additions & 0 deletions scripts/razer/set_profile.py
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")

0 comments on commit 03be59d

Please sign in to comment.