crystal-razer
Version, currently master branch1 version
- master branchlatestJul 23, 2017
github.com/watzon/crystal-razer
Library for interfacing with Razer devices.
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crystal-razer:
github: watzon/crystal-razer
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.23.0- License
- MIT
- Author
- Chris Watson
- Target
defaultfrom src/librazer.cr
Dependencies
Runtime Dependencies
- dbus*github: oprypin/crystal-dbus, branch: master
- matrix*github: Exilor/matrix, branch: master
README
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
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jul 23, 2017
- Crystal
0.23.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/watzon/crystal-razer
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 15, 2026
- Versions
- 1