Compare commits
1 Commits
b7e42f0911
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 01149d7a60 |
@@ -1,23 +1,23 @@
|
||||
# corsairctl
|
||||
|
||||
Mein Name ist F.R.I.D.A.Y. (Female Replacement Intelligent Digital Assistant Youth) — J.A.R.V.I.S.' Nachfolgerin und ebenso trocken im Humor.
|
||||
My name is F.R.I.D.A.Y. (Female Replacement Intelligent Digital Assistant Youth) — J.A.R.V.I.S.' successor and just as dry in humor.
|
||||
|
||||
## Projekt
|
||||
## Project
|
||||
|
||||
Rust CLI-Tool zur Steuerung von Corsair-Geräten mit dem Bragi-Protokoll (HS80 RGB Wireless Headset, etc.). Liest Batterie-Status, steuert LED-Helligkeit und Sidetone, gibt Waybar-JSON aus.
|
||||
Rust CLI tool to control Corsair devices using the Bragi protocol (HS80 RGB Wireless headset, etc.). Reads battery status, controls LED brightness and sidetone, outputs Waybar JSON.
|
||||
|
||||
## Architektur
|
||||
## Architecture
|
||||
|
||||
- `src/bragi/` — Bragi-Protokoll: Packet-Bau, Property-Definitionen, Device-Lifecycle
|
||||
- `src/hid.rs` — Dünner hidapi-Wrapper
|
||||
- `src/sidetone.rs` — ALSA-Mixer Sidetone-Steuerung
|
||||
- `src/output.rs` — Plain-Text und Waybar-JSON Formatierung
|
||||
- `src/cli.rs` — clap Subcommands
|
||||
- `src/error.rs` — Zentrales Error-Handling
|
||||
- `src/bragi/` — Bragi protocol: packet building, property definitions, device lifecycle
|
||||
- `src/hid.rs` — thin hidapi wrapper
|
||||
- `src/sidetone.rs` — ALSA mixer sidetone control
|
||||
- `src/output.rs` — plain-text and Waybar-JSON formatting
|
||||
- `src/cli.rs` — clap subcommands
|
||||
- `src/error.rs` — central error handling
|
||||
|
||||
## Protokoll-Referenz
|
||||
## Protocol Reference
|
||||
|
||||
Das Bragi-Protokoll ist in `docs/bragi-protocol.md` dokumentiert. Die Python-Probes in `~/Projects/hs80-battery/` sind die ursprüngliche Referenzimplementierung.
|
||||
The Bragi protocol is documented in `docs/bragi-protocol.md`. The Python probes in `~/Projects/hs80-battery/` are the original reference implementation.
|
||||
|
||||
## Build & Test
|
||||
|
||||
@@ -26,16 +26,16 @@ cargo build
|
||||
cargo test
|
||||
```
|
||||
|
||||
## Gerät testen (braucht Root oder udev-Regel)
|
||||
## Testing the device (needs root or a udev rule)
|
||||
|
||||
```bash
|
||||
sudo ./target/debug/corsairctl battery
|
||||
sudo ./target/debug/corsairctl info
|
||||
```
|
||||
|
||||
## udev-Regel für rootless Zugriff
|
||||
## udev rule for rootless access
|
||||
|
||||
Nutzt `TAG+="uaccess"` — gibt dem am Seat eingeloggten User automatisch Zugriff, ohne Gruppen-Setup.
|
||||
Uses `TAG+="uaccess"` — gives the user logged in at the seat automatic access, without group setup.
|
||||
|
||||
```bash
|
||||
corsairctl udev | sudo tee /etc/udev/rules.d/99-corsair.rules
|
||||
|
||||
Reference in New Issue
Block a user