|
|
@@ -74,7 +74,7 @@ the binary, because that board is not in VIA's collection and so cannot be fetch
|
|
|
at all; that directory is read only at build time.
|
|
|
|
|
|
Without a definition the keyboard is still fully driven with `brightness`, `speed`,
|
|
|
-`color`, `effect <index>` and `info` — only the effect names are missing, and
|
|
|
+`color`, an effect index and `info` — only the effect names are missing, and
|
|
|
[Effect Names Are Per Board](#effect-names-are-per-board) says what that costs and
|
|
|
what the file does and does not tell the tool.
|
|
|
|
|
|
@@ -126,7 +126,7 @@ behaviour comes from whichever binary is on `$PATH`. What the shell offers is
|
|
|
registered per flag and per argument, which is why these work:
|
|
|
|
|
|
```bash
|
|
|
-$ qmk-rgb-tool effect --zone <TAB> # the QMK subsystem names and the board's own
|
|
|
+$ qmk-rgb-tool effect <TAB> # the QMK subsystem names and the board's own
|
|
|
$ qmk-rgb-tool effect --device <TAB> # the numbers `keyboard info` prints
|
|
|
$ qmk-rgb-tool load <TAB> # the profiles in the per-user profiles/
|
|
|
```
|
|
|
@@ -142,47 +142,85 @@ into the prompt, which is worse than an empty list.
|
|
|
# Discover connected keyboards
|
|
|
./qmk-rgb-tool keyboard info
|
|
|
|
|
|
-# RGB commands target every channel the keyboard reports, in channel order
|
|
|
-./qmk-rgb-tool effect breathing
|
|
|
-./qmk-rgb-tool effect rainbow_moving_chevron
|
|
|
-./qmk-rgb-tool effect rainbow_moving_chevron --zone backlight
|
|
|
-./qmk-rgb-tool brightness 160
|
|
|
-./qmk-rgb-tool speed 2
|
|
|
-./qmk-rgb-tool color 00ff00
|
|
|
-./qmk-rgb-tool color hsv:85,255,255
|
|
|
-# A raw effect index is zone-specific; ID 17 is Backlight-only
|
|
|
-./qmk-rgb-tool effect 17 --zone backlight
|
|
|
-./qmk-rgb-tool enable
|
|
|
-./qmk-rgb-tool disable
|
|
|
+# A lighting command names its target as its first argument
|
|
|
+./qmk-rgb-tool effect rgb_matrix breathing
|
|
|
+./qmk-rgb-tool effect backlight rainbow_moving_chevron
|
|
|
+./qmk-rgb-tool brightness side 160
|
|
|
+./qmk-rgb-tool speed all 2
|
|
|
+./qmk-rgb-tool color all 00ff00
|
|
|
+./qmk-rgb-tool color backlight hsv:85,255,255
|
|
|
+# Several channels at once, comma separated; a raw effect index is
|
|
|
+# zone-specific, and ID 17 is Backlight-only
|
|
|
+./qmk-rgb-tool brightness logo,side 160
|
|
|
+./qmk-rgb-tool effect backlight 17
|
|
|
+./qmk-rgb-tool enable all
|
|
|
+./qmk-rgb-tool disable logo
|
|
|
./qmk-rgb-tool info
|
|
|
|
|
|
-# Select exactly one zone
|
|
|
-./qmk-rgb-tool brightness 160 --zone side
|
|
|
+# Reading needs no target: without a name, an effect or an info reads everything
|
|
|
+./qmk-rgb-tool effect all
|
|
|
+./qmk-rgb-tool effect logo
|
|
|
+./qmk-rgb-tool info
|
|
|
|
|
|
# Save and load RGB profiles
|
|
|
./qmk-rgb-tool save paul
|
|
|
./qmk-rgb-tool load paul
|
|
|
+./qmk-rgb-tool load paul side
|
|
|
./qmk-rgb-tool list
|
|
|
./qmk-rgb-tool delete paul
|
|
|
|
|
|
# Select a keyboard by the number shown in `keyboard info`
|
|
|
-./qmk-rgb-tool --device 1 enable
|
|
|
+./qmk-rgb-tool --device 1 enable rgb_matrix
|
|
|
```
|
|
|
|
|
|
-`--zone` accepts a VIA lighting channel: `backlight`, `rgblight`, `rgb_matrix`,
|
|
|
-`audio` or `led_matrix`, and may be given on any subcommand. That name follows
|
|
|
+The zone is a VIA lighting channel: `backlight`, `rgblight`, `rgb_matrix`, `audio`
|
|
|
+or `led_matrix`, and every command that names a channel takes it. That name follows
|
|
|
from the channel number, so it works on every QMK keyboard. A board's definition
|
|
|
file may name a channel differently, and that name is accepted too, ignoring
|
|
|
case — the Impact 80 calls channels 2, 3 and 4 `logo`, `Backlight` and `side`.
|
|
|
Where a name would be the subsystem name of a different channel the keyboard has,
|
|
|
the board is refused rather than a command being sent to the wrong channel.
|
|
|
|
|
|
-`--zone` is not remembered between runs: repeat it on every invocation. Without
|
|
|
-`--zone`, commands target every channel the keyboard reports, in channel order.
|
|
|
-With `--zone`, commands target exactly the named channel. An unknown name fails
|
|
|
-before the device is opened; an effect a named channel does not have fails
|
|
|
-rather than being skipped, while a default command skips it and prints a
|
|
|
-warning on stderr.
|
|
|
+Several channels are written comma separated, and `all` is every channel the
|
|
|
+keyboard reports: `brightness logo,side 160` reaches exactly those two, and
|
|
|
+`all` next to another name is the same request as `all` alone, since the union of
|
|
|
+the two is the whole keyboard. A name written twice is one channel, spaces around
|
|
|
+the commas are ignored, and the channels are always written in channel order, so a
|
|
|
+script sees one order for every spelling of the same selection.
|
|
|
+
|
|
|
+The zone is an argument rather than a flag because a flag every help listed told
|
|
|
+`keyboard info` and `list` about a channel they cannot address, and they ignored
|
|
|
+it. A command that writes lighting — `effect`, `brightness`, `speed`, `color`,
|
|
|
+`enable`, `disable` — cannot be called without one, and the argument count refuses
|
|
|
+it before the keyboard is opened:
|
|
|
+
|
|
|
+```console
|
|
|
+$ qmk-rgb-tool brightness 160
|
|
|
+Error: brightness takes a zone and a brightness value
|
|
|
+usage: qmk-rgb-tool brightness <zone> <val>
|
|
|
+```
|
|
|
+
|
|
|
+A zone the keyboard does not have is refused by name, and where a list names
|
|
|
+several it names every one that is missing, so nothing is written on the way to a
|
|
|
+failure:
|
|
|
+
|
|
|
+```console
|
|
|
+$ qmk-rgb-tool brightness logo,led_matrix 160
|
|
|
+Error: this keyboard has no led_matrix channel
|
|
|
+```
|
|
|
+
|
|
|
+A command that only reads needs no zone: `info`, `effect` without a name and
|
|
|
+`save` report every channel the keyboard has, which is what they are for. `load`
|
|
|
+applies the zones its profile names, and a second argument narrows that to the
|
|
|
+channel or channels it names.
|
|
|
+
|
|
|
+An unknown name fails before the device is opened. An effect a named channel does
|
|
|
+not have fails rather than being skipped, `all` included — `effect all` asks for
|
|
|
+every channel, so a name only one of them has is a request the tool cannot carry
|
|
|
+out, not a reason to write the others and report it as done. `load` is the one
|
|
|
+place a name is skipped instead, with a warning on stderr, because there a whole
|
|
|
+profile is being applied and a key the board cannot do is worth saying rather
|
|
|
+than refusing over.
|
|
|
|
|
|
The keyboard is asked which channels it has: one read per channel, and a channel
|
|
|
its firmware does not implement answers as unhandled. The probe covers channels 1
|
|
|
@@ -203,14 +241,14 @@ All output is machine-parseable JSON when applicable. The shapes an agent parses
|
|
|
"effectId": 2, "brightness": 10, "speed": 0,
|
|
|
"color": {"hue": 0, "saturation": 255}, "error": "only on a channel that failed"}]}
|
|
|
|
|
|
-// effect --list
|
|
|
+// effect all
|
|
|
{"catalog": "Impact 80",
|
|
|
"zones": [{"zone": "logo", "channel": 2, "subsystem": "rgblight",
|
|
|
"effect": "none", "id": 0}]}
|
|
|
```
|
|
|
|
|
|
`catalog` carries the name from the definition file, so it is the vendor's own
|
|
|
-rather than a label this tool invented. `effect --list` reports `"catalog": ""` and
|
|
|
+rather than a label this tool invented. `effect all` reports `"catalog": ""` and
|
|
|
an empty `zones` array for a board that has no definition, and it reads the
|
|
|
keyboard to learn which channels to list.
|
|
|
`info` prints the JSON and then exits non-zero if a channel could not be read.
|
|
|
@@ -240,9 +278,9 @@ rather than storing the number.
|
|
|
`color` accepts three notations for one operation:
|
|
|
|
|
|
```bash
|
|
|
-qmk-rgb-tool color ff0000 # six digit hex
|
|
|
-qmk-rgb-tool color rgb:ff0000 # the same, written out
|
|
|
-qmk-rgb-tool color hsv:0,255,255 # hue, saturation, value, each 0-255
|
|
|
+qmk-rgb-tool color rgb_matrix ff0000 # six digit hex
|
|
|
+qmk-rgb-tool color all rgb:ff0000 # the same, written out
|
|
|
+qmk-rgb-tool color side hsv:0,255,255 # hue, saturation, value, each 0-255
|
|
|
```
|
|
|
|
|
|
`hsv:` takes the numbers the keyboard itself computes in, so a color can be
|
|
|
@@ -259,9 +297,9 @@ Verbatim" for the table.
|
|
|
Every notation is read back, so the line reports what the keyboard holds:
|
|
|
|
|
|
```console
|
|
|
-$ qmk-rgb-tool color 00ff00 --zone backlight
|
|
|
+$ qmk-rgb-tool color backlight 00ff00
|
|
|
Color set to hue 85 sat 255
|
|
|
-$ qmk-rgb-tool color hsv:0,255,200
|
|
|
+$ qmk-rgb-tool color all hsv:0,255,200
|
|
|
Color logo hue 0 sat 255 brightness 160 backlight hue 0 sat 255 brightness 255 (requested hue 0 sat 255 brightness 200)
|
|
|
```
|
|
|
|
|
|
@@ -274,7 +312,7 @@ a hex triple.
|
|
|
|
|
|
## Effect Names Are Per Board
|
|
|
|
|
|
-The keyboard holds effect numbers, not names, so `effect <name>` needs a catalog,
|
|
|
+The keyboard holds effect numbers, not names, so `effect <zone> <name>` needs a catalog,
|
|
|
and the catalog is the board's VIA definition file. **No catalog is hand-written
|
|
|
into this tool for any board.** A transcribed name list and the vendor's file
|
|
|
describing the same board are two places to update one name, and that is how the
|
|
|
@@ -297,11 +335,11 @@ channels of the same board. The tool's own spellings resolve alongside them
|
|
|
`effect` writes the ID and reads the register back, because a board can refuse
|
|
|
one. All 47 backlight IDs are taken, and so are the `logo` and `side` IDs from 1
|
|
|
to 6. ID 0 is not: on those two channels the firmware reads it as "lighting
|
|
|
-off" and leaves the mode register where it was, so `effect none --zone logo`
|
|
|
+off" and leaves the mode register where it was, so `effect logo none`
|
|
|
leaves the previous effect running and says so.
|
|
|
|
|
|
```
|
|
|
-$ qmk-rgb-tool effect none --zone logo
|
|
|
+$ qmk-rgb-tool effect logo none
|
|
|
Effect logo "wave" (1) (requested "none" (0))
|
|
|
```
|
|
|
|
|
|
@@ -315,7 +353,7 @@ above 46 down to it. The definition file names 46 of them, ending at `riverflow`
|
|
|
so **ID 46 has no name and the tool does not invent one**:
|
|
|
|
|
|
```
|
|
|
-$ qmk-rgb-tool effect 46 --zone backlight
|
|
|
+$ qmk-rgb-tool effect backlight 46
|
|
|
Effect set to index 46
|
|
|
$ qmk-rgb-tool info
|
|
|
unknown
|
|
|
@@ -336,17 +374,17 @@ Wobkey's own
|
|
|
ID from its dropdown either. A raw `effect 46` is the only way to reach it.
|
|
|
|
|
|
A keyboard without a catalog is still driven: `brightness`, `speed`, `color`,
|
|
|
-`effect <index>` and `info` all work, because none of them needs a name. Four
|
|
|
+an effect index and `info` all work, because none of them needs a name. Four
|
|
|
commands need the catalog and say so rather than guessing:
|
|
|
|
|
|
```
|
|
|
-$ qmk-rgb-tool effect wave
|
|
|
+$ qmk-rgb-tool effect rgb_matrix wave
|
|
|
Error: no effect names for this keyboard: run `keyboard fetch` for its VIA definition, or set an
|
|
|
-effect by number with `effect <index>`
|
|
|
+effect by number with `effect <zone> <index>`
|
|
|
|
|
|
-$ qmk-rgb-tool enable
|
|
|
+$ qmk-rgb-tool enable rgb_matrix
|
|
|
Error: this keyboard has no effect names, so `enable` cannot choose an effect: run `keyboard fetch` for
|
|
|
-its VIA definition, or set one with `effect <index>`
|
|
|
+its VIA definition, or set one with `effect <zone> <index>`
|
|
|
|
|
|
$ qmk-rgb-tool load paul
|
|
|
Warning: profile "paul" has no effect names for this keyboard, so nothing applied; run `keyboard fetch` for
|
|
|
@@ -354,7 +392,7 @@ its VIA definition
|
|
|
|
|
|
$ qmk-rgb-tool save paul
|
|
|
Warning: this keyboard has no effect names, so the profile records effect "unknown" and cannot restore it; run
|
|
|
-`keyboard fetch` for its VIA definition, or set an effect with `effect <index>`
|
|
|
+`keyboard fetch` for its VIA definition, or set an effect with `effect <zone> <index>`
|
|
|
```
|
|
|
|
|
|
`enable` needs it because it has to choose an effect to turn a channel on.
|
|
|
@@ -367,9 +405,9 @@ Naming a real effect on a channel that does not have it is refused, and a name
|
|
|
the board does not have anywhere is reported as unknown:
|
|
|
|
|
|
```
|
|
|
-$ qmk-rgb-tool effect rainbow_moving_chevron --zone logo
|
|
|
+$ qmk-rgb-tool effect logo rainbow_moving_chevron
|
|
|
Error: effect rainbow_moving_chevron is not supported on rgblight
|
|
|
-$ qmk-rgb-tool effect nonsense --zone rgb_matrix
|
|
|
+$ qmk-rgb-tool effect rgb_matrix nonsense
|
|
|
Error: unknown effect: nonsense
|
|
|
```
|
|
|
|
|
|
@@ -444,13 +482,13 @@ range is 0–255 but the value the keyboard ends up holding is often different.
|
|
|
applied:
|
|
|
|
|
|
```console
|
|
|
-$ qmk-rgb-tool brightness 200
|
|
|
+$ qmk-rgb-tool brightness all 200
|
|
|
Brightness logo 160 backlight 255 side 160 (requested 200)
|
|
|
-$ qmk-rgb-tool brightness 160 --zone logo
|
|
|
+$ qmk-rgb-tool brightness logo 160
|
|
|
Brightness set to 160
|
|
|
-$ qmk-rgb-tool speed 60
|
|
|
+$ qmk-rgb-tool speed all 60
|
|
|
Speed logo 4 backlight 60 side 4 (requested 60)
|
|
|
-$ qmk-rgb-tool speed 60 --zone backlight
|
|
|
+$ qmk-rgb-tool speed backlight 60
|
|
|
Speed set to 60
|
|
|
```
|
|
|
|
|
|
@@ -486,7 +524,7 @@ failure, but the summary line always states the value that was actually applied.
|
|
|
- **Effect names from VIA definition files** — the vendor's own names, read at runtime; no name is hand-written, so there is one source per board, and a file the user places overrides the one built in
|
|
|
- **Compatibility aliases** — `off`, `breathe`, `rainbow`, `rainbow_wave`, `solid`, `static` resolve to correct effect IDs per channel
|
|
|
- **Reactive & splash effects** — honor `color` and `speed` for key-press illumination
|
|
|
-- **Machine-parseable output** — text by default, JSON behind `--json` for `keyboard info`, `info`, `list`, `effect --list` and `keyboard definitions`
|
|
|
+- **Machine-parseable output** — text by default, JSON behind `--json` for `keyboard info`, `info`, `list`, the effect list and `keyboard definitions`
|
|
|
- **Agent-friendly** — designed for automation, scripting, and CLI-first workflows
|
|
|
- **Multiple devices** — `keyboard info` numbers each keyboard; `--device <n>` targets one
|
|
|
|
|
|
@@ -503,7 +541,7 @@ 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. Two of these are the tool's own
|
|
|
-spellings: the file writes `fixed wave` and `breathe`, and `effect --list` prints
|
|
|
+spellings: the file writes `fixed wave` and `breathe`, and the effect list prints
|
|
|
the file's spelling.
|
|
|
|
|
|
| ID | Name | In the file |
|
|
|
@@ -550,7 +588,7 @@ one column carries the whole list:
|
|
|
|
|
|
The names below are the tool's own spellings, which every definition resolves
|
|
|
alongside the vendor's; the output shows whichever the file in use writes, so
|
|
|
-`effect --list` may print `fixed wave` and `breathe` where this list says
|
|
|
+The effect list may print `fixed wave` and `breathe` where this list says
|
|
|
`fixed_wave` and `breathing`. Same effect, same ID.
|
|
|
|
|
|
Effects fall into categories that behave differently:
|
|
|
@@ -590,13 +628,13 @@ character as far as lookup is concerned. So on this board all four of these sele
|
|
|
the same effect:
|
|
|
|
|
|
```
|
|
|
-qmk-rgb-tool effect breathe --zone logo # the file's spelling
|
|
|
-qmk-rgb-tool effect breathing --zone logo # the tool's spelling
|
|
|
-qmk-rgb-tool effect fixed_wave --zone logo # the tool's spelling
|
|
|
-qmk-rgb-tool effect "fixed wave" --zone logo # the file's spelling
|
|
|
+qmk-rgb-tool effect logo breathe # the file's spelling
|
|
|
+qmk-rgb-tool effect logo breathing # the tool's spelling
|
|
|
+qmk-rgb-tool effect logo fixed_wave # the tool's spelling
|
|
|
+qmk-rgb-tool effect logo "fixed wave" # the file's spelling
|
|
|
```
|
|
|
|
|
|
-`info` and `effect --list` report the spelling the file uses, so the output
|
|
|
+`info` and the effect list report the spelling the file uses, so the output
|
|
|
carries `fixed wave` and `breathe` where this document's own prose uses the tool's
|
|
|
`fixed_wave` and `breathing`. The ID beside the name is the same in both. The file
|
|
|
is also inconsistent with itself across channels — `breathing` on `backlight`,
|
|
|
@@ -696,8 +734,8 @@ channel at all is listed and then fails every command that opens it with
|
|
|
A definition also names its channels, and that is where the name comes from —
|
|
|
there is no other place. They are the names VIA shows, so the tool and VIA call
|
|
|
a channel the same thing, and a name is matched ignoring case. On a board whose
|
|
|
-definition writes `Backlight`, all of `--zone backlight`, `--zone Backlight` and
|
|
|
-`--zone rgb_matrix` reach the same channel: the label is the name, the subsystem
|
|
|
+definition writes `Backlight`, all of `brightness backlight`, `brightness Backlight` and
|
|
|
+`brightness rgb_matrix` reach the same channel: the label is the name, the subsystem
|
|
|
stays accepted because it follows from the channel number. `qmk-rgb-tool
|
|
|
keyboard definitions` prints the label beside the subsystem it stands for, and says
|
|
|
where each definition came from — `user` for a file in the per-user directory,
|
|
|
@@ -752,36 +790,44 @@ board", and that file is gone, so the field would have been unanswerable:
|
|
|
| Command | Description |
|
|
|
|---------------------------------|------------------------------------------|
|
|
|
| `qmk-rgb-tool keyboard info` | Discover connected QMK keyboards |
|
|
|
-| `qmk-rgb-tool enable` | Enable selected lighting zones |
|
|
|
-| `qmk-rgb-tool disable` | Disable selected lighting zones |
|
|
|
-| `qmk-rgb-tool info` | Show per-zone RGB state |
|
|
|
-| `qmk-rgb-tool effect <name\|index>` | Set an effect by name, or a raw effect index 0–255, verified by read-back; a board that does not implement the index clamps it to the highest it does |
|
|
|
-| `qmk-rgb-tool effect` | With no argument, list every effect per channel |
|
|
|
-| `qmk-rgb-tool effect --list` | The same list, as a flag |
|
|
|
+| `qmk-rgb-tool enable <zone>` | Enable the named lighting zones |
|
|
|
+| `qmk-rgb-tool disable <zone>` | Disable the named lighting zones |
|
|
|
+| `qmk-rgb-tool info [zone]` | Show per-zone RGB state; without a zone, every channel |
|
|
|
+| `qmk-rgb-tool effect <zone> <name\|index>` | Set an effect by name, or a raw effect index 0–255, verified by read-back; a board that does not implement the index clamps it to the highest it does |
|
|
|
+| `qmk-rgb-tool effect <zone>` | With no name, list the effects that zone has; `effect all` lists every channel |
|
|
|
| `qmk-rgb-tool keyboard fetch` | Download the VIA definition for the connected keyboard |
|
|
|
| `qmk-rgb-tool keyboard definitions` | List every definition in use, from the per-user directory and built into the binary, each marked with which it is |
|
|
|
-| `qmk-rgb-tool brightness <val>` | Set brightness (0–255) on selected zones, verified by read-back |
|
|
|
-| `qmk-rgb-tool speed <val>` | Set effect speed (0–255) on selected zones, verified by read-back; on `logo` and `side` only 0, 1 and 4 are reachable |
|
|
|
-| `qmk-rgb-tool color <hex>` | Set color (e.g. `ff0000`) on selected zones |
|
|
|
-| `qmk-rgb-tool color rgb:<hex>` | The same hex color, written out |
|
|
|
-| `qmk-rgb-tool color hsv:<h>,<s>,<v>` | Set hue and saturation (0–255) and write `v` to the brightness of the same zones |
|
|
|
-| `qmk-rgb-tool --zone <channel> ...` | Target one channel: `backlight`, `rgblight`, `rgb_matrix`, `audio` or `led_matrix`, or the name the board's definition gives it |
|
|
|
+| `qmk-rgb-tool brightness <zone> <val>` | Set brightness (0–255) on the named zones, verified by read-back |
|
|
|
+| `qmk-rgb-tool speed <zone> <val>` | Set effect speed (0–255) on the named zones, verified by read-back; on `logo` and `side` only 0, 1 and 4 are reachable |
|
|
|
+| `qmk-rgb-tool color <zone> <hex>` | Set color (e.g. `ff0000`) on the named zones |
|
|
|
+| `qmk-rgb-tool color <zone> rgb:<hex>` | The same hex color, written out |
|
|
|
+| `qmk-rgb-tool color <zone> hsv:<h>,<s>,<v>` | Set hue and saturation (0–255) and write `v` to the brightness of the same zones |
|
|
|
+| `qmk-rgb-tool <command> <zone> ...` | Name the channels: `backlight`, `rgblight`, `rgb_matrix`, `audio` or `led_matrix`, the name the board's definition gives it, several comma separated, or `all` for every channel the keyboard reports. A command that writes lighting cannot be called without one |
|
|
|
| `qmk-rgb-tool --device <n> ...` | Target keyboard by number (see `keyboard info`) |
|
|
|
| `qmk-rgb-tool --definition <path>` | Read effect names from this VIA definition file instead of the one in the data directory; applies to every command that resolves names, and a file for another board is refused |
|
|
|
-| `qmk-rgb-tool --json` | Print JSON instead of text, for `keyboard info`, `info`, `list`, `effect --list` and `keyboard definitions` |
|
|
|
+| `qmk-rgb-tool --json` | Print JSON instead of text, for `keyboard info`, `info`, `list`, the effect list and `keyboard definitions` |
|
|
|
| `qmk-rgb-tool -v`, `--version` | Print the version |
|
|
|
-| `qmk-rgb-tool save [name]` | Save current RGB state as `<name>.json` in the per-user `profiles/` (name lowercased, non-`[a-z0-9-_]` mapped to `-`, a leading `-` prefixed with `unnamed-`); without a name it writes `default` |
|
|
|
-| `qmk-rgb-tool load [name]` | Load and apply a profile by name from the per-user `profiles/`; without a name it loads `default` |
|
|
|
+| `qmk-rgb-tool save [name]` | Save the current state of **every** channel as `<name>.json` in the per-user `profiles/` (name lowercased, non-`[a-z0-9-_]` mapped to `-`, a leading `-` prefixed with `unnamed-`); without a name it writes `default` |
|
|
|
+| `qmk-rgb-tool load <name> [zone]` | Load and apply a profile by name from the per-user `profiles/`; without a zone it applies the profile to every channel it names, with one it applies it to the named channels only |
|
|
|
| `qmk-rgb-tool list` | List saved profiles |
|
|
|
| `qmk-rgb-tool delete [name]` | Delete a saved profile; without a name it deletes `default` |
|
|
|
| `qmk-rgb-tool completion <shell>` | Write an autocompletion script for `bash`, `zsh`, `fish` or `powershell` to stdout |
|
|
|
|
|
|
-`enable`, `disable`, `info` and `list` take no arguments and reject a stray
|
|
|
-token. `effect`, `load`, `save` and `delete` accept an optional name.
|
|
|
-`brightness`, `speed` and `color` require exactly one argument. `effect` takes one
|
|
|
-argument too, and accepts either a name or a raw effect ID.
|
|
|
-
|
|
|
-`keyboard info`, `info`, `list`, `keyboard definitions` and `effect --list` print
|
|
|
+`enable` and `disable` take a zone and nothing else. `brightness`, `speed` and
|
|
|
+`color` take a zone and a value. `effect` takes a zone and, optionally, an effect
|
|
|
+name or a raw effect ID: two arguments set it, one lists that zone's effects.
|
|
|
+`info` takes at most a zone, `load` a profile name and at most a zone, `save` and
|
|
|
+`delete` an optional name, and `list` nothing. `list` and the `keyboard`
|
|
|
+subcommands reject a stray token, which is how a mistyped invocation is caught
|
|
|
+before it looks like a command that did its work.
|
|
|
+
|
|
|
+A zone is an argument and not a flag, so a command that cannot address a channel —
|
|
|
+`keyboard info`, `list`, `delete` — has no way to be handed one, and its help says
|
|
|
+nothing about channels. That is the whole reason it is spelled this way: a flag on
|
|
|
+the root is a flag every help lists, and it was ignored rather than refused
|
|
|
+wherever it did not apply.
|
|
|
+
|
|
|
+`keyboard info`, `info`, `list`, `keyboard definitions` and the effect list print
|
|
|
text, because a person reads them. Pass `--json` for the machine shape, which is
|
|
|
the same data with the same field names as before:
|
|
|
|
|
|
@@ -812,7 +858,8 @@ there are reported per key and skipped — but it says which profile belongs to
|
|
|
which keyboard. A profile written before this field existed has no board and is
|
|
|
loaded without complaint. The keys are the names the file was written with, so
|
|
|
a profile written before a board was renamed reports the key it cannot place and
|
|
|
-skips it. They are the only way to persist RGB
|
|
|
+skips it. `load` applies the zones the profile names, and a second argument
|
|
|
+narrows that to the channels it names. They are the only way to persist RGB
|
|
|
settings across reboots. The keyboard's VIA protocol does not expose a
|
|
|
standard command to save RGB state to internal EEPROM, so profiles rely on
|
|
|
files instead.
|