crystal-razer
crystal-razer
Facilitate control of your Razer chroma devices.
Installation
Add this to your application's shard.yml
:
dependencies:
crystal-razer:
github: watzon/crystal-razer
Usage
require "crystal-razer"
# Create a new DeviceManager instance
dm = Razer::DeviceManager.new
# List connected Razer devices
pp dm.devices #=> [#<Razer::Devices::RazerKeyboard:0x561974a06f80 ...]
# Select a particular device
kbd = dm.devices[0].as(Razer::Devices.Keyboard) # Not ideal having to use `.as()`, but it's all that works for now
# List available features for the device
pp kbd.get_available_features #=> [#<Razer::Devices::RazerKeyboard:0x563b4e057f80
# @available_features=
# {"razer.device.misc" =>
# ["getSerial",
# "suspendDevice",
# "getDeviceMode",
# "getRazerUrls",
# "setDeviceMode"
# ...]
# }
# ]
# Set the keyboard's color to a static color
green = Razer::RGB.from(:razer_green)
kbd.fx.static(green)
Development
Just submit a PR if you want to add any features. You can check 'terrycain/razer-drivers' for help, as that is the library that I got everything from.
Contributing
- Fork it ( https://github.com/watzon/crystal-razer/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- watzon - creator, maintainer
Repository
crystal-razer
Owner
Statistic
- 1
- 0
- 0
- 0
- 1
- over 7 years ago
- July 21, 2017
License
MIT License
Links
Synced at
Thu, 07 Nov 2024 10:22:28 GMT
Languages