|
|
@@ -1,6 +1,8 @@
|
|
|
# QMK RGB Tool
|
|
|
|
|
|
-Control the RGB lighting on QMK-compatible keyboards. Supports Impact 80 and Rainy 75 out of the box, and any other keyboard running QMK with the RGB Matrix subsystem and VIA support.
|
|
|
+Control the RGB lighting on QMK-compatible keyboards. Any keyboard running QMK with a
|
|
|
+lighting channel and VIA support is driven; the Impact 80's effect names are built in,
|
|
|
+every other board's are fetched with `keyboard fetch`.
|
|
|
|
|
|
Cross-platform CLI for Linux, macOS, and Windows. Designed for automation, scripting, and agent consumption.
|
|
|
|
|
|
@@ -102,6 +104,20 @@ fpath=("$HOME/.zsh/completions" $fpath)
|
|
|
autoload -Uz compinit && compinit
|
|
|
```
|
|
|
|
|
|
+On macOS, a Homebrew install already puts a directory on `$fpath`, so the file
|
|
|
+needs no `.zshrc` change and no `compinit` re-run — writing it there is enough.
|
|
|
+The prefix depends on the architecture, so take the one `zsh` reports:
|
|
|
+
|
|
|
+```zsh
|
|
|
+print -l $fpath | grep zsh/site-functions
|
|
|
+qmk-rgb-tool completion zsh > /opt/homebrew/share/zsh/site-functions/_qmk-rgb-tool
|
|
|
+```
|
|
|
+
|
|
|
+The binary itself has to be on `$PATH` for any of this to offer more than command
|
|
|
+names. The generated script calls it back for every candidate and discards the
|
|
|
+error, so a binary that is missing degrades to plain file completion without a
|
|
|
+message.
|
|
|
+
|
|
|
Open a new shell afterwards.
|
|
|
|
|
|
The generated script is a shim: cobra's shells ask the running binary what to
|
|
|
@@ -302,6 +318,7 @@ so **ID 46 has no name and the tool does not invent one**:
|
|
|
$ qmk-rgb-tool effect 46 --zone backlight
|
|
|
Effect set to index 46
|
|
|
$ qmk-rgb-tool info
|
|
|
+unknown
|
|
|
Backlight on unknown brightness 255 speed 127 color hsv:0,255
|
|
|
```
|
|
|
|
|
|
@@ -390,9 +407,12 @@ as `All Off`, `NONE` or `00.NONE` depending on the vendor.
|
|
|
That is why a catalog cannot be defaulted per subsystem, and it is the same
|
|
|
reason the Impact 80 needs its own. Its backlight channel reorders IDs 15 to 17 —
|
|
|
`cycle_out_in`, `cycle_out_in_dual`, then `rainbow_moving_chevron`, where the
|
|
|
-built-in list has `rainbow_moving_chevron` first — and its list runs to 45 because
|
|
|
-it adds `flower_blooming`, `starlight`, `starlight_dual_hue`, `starlight_dual_sat`
|
|
|
-and `riverflow`, none of which the built-in list has. A board can also be at an
|
|
|
+built-in list has `rainbow_moving_chevron` first. It also edits the set and not
|
|
|
+only the order: it drops four names the built-in list has — `pixel_rain`,
|
|
|
+`pixel_fractal`, `typing_heatmap` and `solid_reactive_simple` — and adds five it
|
|
|
+does not have: `flower_blooming`, `starlight`, `starlight_dual_hue`,
|
|
|
+`starlight_dual_sat` and `riverflow`. 45 − 4 + 5 = 46 names, ending at ID 45. A
|
|
|
+board can also be at an
|
|
|
ID the built-in list does not name at all, and the source for that name is the
|
|
|
board, not VIA:
|
|
|
|
|
|
@@ -450,7 +470,7 @@ those two channels is `[0, 4]`, not 0–255:
|
|
|
|---:|---:|---|
|
|
|
| `0` | `0` | the animation is frozen, the color stands still |
|
|
|
| `1` | `1` | the slowest movement |
|
|
|
-| `2` and above | `4` | twice as fast; this is where every larger request lands |
|
|
|
+| `2` and above | `4` | where every larger request lands; the ratio to `1` has not been measured |
|
|
|
|
|
|
The freeze at `0` was observed on `logo`; `side` reports the same range and the
|
|
|
same collapse to 4. `backlight` is the only channel with a usable 0–255 range.
|
|
|
@@ -482,19 +502,22 @@ Those three display names come from the board's definition file, in the sub-menu
|
|
|
it puts each channel under. The QMK subsystem names for the same channels are
|
|
|
`rgblight`, `rgb_matrix` and `audio`, and both spellings work on this board.
|
|
|
|
|
|
-Logo and Side share this complete effect family:
|
|
|
+Logo and Side share this complete effect family. Two of these are the tool's own
|
|
|
+spellings: the file writes `fixed wave` and `breathe`, and `effect --list` prints
|
|
|
+the file's spelling.
|
|
|
|
|
|
-| ID | Name |
|
|
|
-|---:|---|
|
|
|
-| 0 | `none` |
|
|
|
-| 1 | `wave` |
|
|
|
-| 2 | `fixed_wave` |
|
|
|
-| 3 | `spectrum` |
|
|
|
-| 4 | `breathing` |
|
|
|
-| 5 | `light` |
|
|
|
-| 6 | `shutdown` |
|
|
|
+| ID | Name | In the file |
|
|
|
+|---:|---|---|
|
|
|
+| 0 | `none` | `none` |
|
|
|
+| 1 | `wave` | `wave` |
|
|
|
+| 2 | `fixed_wave` | `fixed wave` |
|
|
|
+| 3 | `spectrum` | `spectrum` |
|
|
|
+| 4 | `breathing` | `breathe` |
|
|
|
+| 5 | `light` | `light` |
|
|
|
+| 6 | `shutdown` | `shutdown` |
|
|
|
|
|
|
-Backlight uses the complete Impact 80 catalog:
|
|
|
+Backlight uses the complete Impact 80 catalog. Here the two spellings agree, so
|
|
|
+one column carries the whole list:
|
|
|
|
|
|
| ID | Name | ID | Name |
|
|
|
|---:|---|---:|---|
|
|
|
@@ -602,7 +625,10 @@ ID 39 is `multisplash`; ID 41 is the distinct `solid_multisplash` name.
|
|
|
effect name and ID, brightness, speed, and color. The top-level `enabled`,
|
|
|
`brightness` and `speed` fields summarize the first selected zone.
|
|
|
If one zone cannot be queried, its record contains an `error`, other records
|
|
|
-are retained, and the process exits non-zero after printing the JSON.
|
|
|
+are retained, and the process exits non-zero after printing the JSON. `error`
|
|
|
+carries `omitempty`, so a zone that read fine has no `error` key at all rather
|
|
|
+than `"error": null` — a parser must treat a missing key and an empty string as
|
|
|
+"no error". Every other field above is always present.
|
|
|
|
|
|
## Platform Setup (udev rules and permissions)
|
|
|
|