fizzctl 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.3
2
+ Name: fizzctl
3
+ Version: 0.2.0
4
+ Summary: Control a Redragon K617 Fizz keyboard on Linux: solid colors, 22 firmware-native RGB effects, per-key painting, live animations, and Cfg.ini keymap restore — no vendor software required
5
+ Keywords: redragon,k617,fizz,rgb,keyboard,backlight,led,hid,linux
6
+ Author: Ayoub Dya
7
+ Author-email: Ayoub Dya <ayoubdya@gmail.com>
8
+ License: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: End Users/Desktop
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Topic :: System :: Hardware :: Hardware Drivers
16
+ Classifier: Topic :: System :: Hardware
17
+ Requires-Dist: dpkt>=1.9.8
18
+ Requires-Dist: hidapi>=0.15.0
19
+ Requires-Python: >=3.14
20
+ Description-Content-Type: text/markdown
21
+
22
+ # fizzctl
23
+
24
+ Linux tool for controlling the Redragon K617 Fizz keyboard's RGB lighting
25
+ and restoring keymaps from `Cfg.ini` files.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ # from PyPI
31
+ pip install fizzctl
32
+
33
+ # from PyPI (uv)
34
+ uv tool install fizzctl
35
+
36
+ # from source
37
+ git clone https://github.com/you/fizzctl.git && cd fizzctl
38
+ uv build && uv tool install .
39
+ ```
40
+
41
+ ### Udev rules (needs one `sudo`)
42
+
43
+ ```bash
44
+ fizzctl setup-udev
45
+ ```
46
+
47
+ This installs `99-k617.rules` to `/etc/udev/rules.d/`, reloads udev and
48
+ re-triggers device events. The command elevates its own privileged steps
49
+ via `sudo` (you are prompted for your password), so you do **not** need to
50
+ wrap it as `sudo fizzctl ...` — that fails because the binary lives in a
51
+ user-local path like `~/.local/bin`. Unplug/replug the keyboard afterwards if
52
+ the trigger did not pick it up.
53
+
54
+ ## Commands
55
+
56
+ | Command | Description | Persists |
57
+ |---|---|---|
58
+ | `rgb` | Set the whole board to a solid color | yes |
59
+ | `effect` | Run one of 22 firmware-native effects | yes |
60
+ | `key` | Paint a single key | yes |
61
+ | `paint` | Paint multiple keys at once | yes |
62
+ | `keymap` | Write the keymap from a Cfg.ini | yes |
63
+ | `animate` | Host-streamed animation (volatile) | no |
64
+
65
+ ## Examples
66
+
67
+ All commands accept short flag aliases alongside their long forms:
68
+ | Long | Short | Applies to |
69
+ |---|---|---|
70
+ | `--color` | `-c` | `effect`, `animate` |
71
+ | `--speed` | `-s` | `effect`, `animate` |
72
+ | `--brightness` | `-b` | `effect`, `rgb` |
73
+ | `--fps` | `-f` | `animate` |
74
+
75
+ ### Write keymap (most important)
76
+
77
+ Apply the full keymap (bindings, lighting zones, function keys) from a
78
+ `Cfg.ini` — the file the official Redragon software exports:
79
+
80
+ ```bash
81
+ fizzctl keymap Cfg.ini
82
+ ```
83
+
84
+ ### Set the whole board to one color
85
+
86
+ ```bash
87
+ fizzctl rgb red
88
+ fizzctl rgb 00ff00 --brightness 4 # or: rgb 00ff00 -b 4
89
+ ```
90
+
91
+ ### Firmware effects
92
+
93
+ All 22 effects from the official Redragon software are supported, with full
94
+ speed and brightness control. `speed` and `brightness` are 5 levels (0-4,
95
+ matching the firmware); higher = faster / brighter. Run `fizzctl effect`
96
+ with no name to list every effect:
97
+
98
+ ```bash
99
+ fizzctl effect
100
+ fizzctl effect rainbow
101
+ fizzctl effect rainbow --speed 2 --brightness 4 # or: -s 2 -b 4
102
+ fizzctl effect fixed-on --color 00ff00 --brightness 3
103
+ fizzctl effect snake --color ff0000 --speed 4
104
+ fizzctl effect off
105
+ ```
106
+
107
+ Aliases are supported: `static` → `fixed-on`, `wheel` → `rainbow-wheel`,
108
+ `snake` → `retro-snake`, `waterfall` → `colorful-waterfall`.
109
+
110
+ ### Per-key painting
111
+
112
+ Keys are named by their top-left legend. Any key *not* listed turns off
113
+ because the canvas is absolute:
114
+
115
+ ```bash
116
+ fizzctl key W ff0000
117
+ fizzctl paint W=ff0000 A=00ff00 S=ffff00 D=ff00ff Space=ffffff
118
+ ```
119
+
120
+ ### Host-side animations
121
+
122
+ Volatile — lost when the keyboard reconnects or reboots. Run `fizzctl
123
+ animate` with no name to list the animations:
124
+
125
+ ```bash
126
+ fizzctl animate
127
+ fizzctl animate rainbow --fps 30 --duration 10 # or: -f 30
128
+ fizzctl animate chase --color ff0000 --speed 2 # or: -c yellow -s 2
129
+ fizzctl animate solid --color 0000ff
130
+ ```
131
+
132
+ ### Debug mode
133
+
134
+ ```bash
135
+ fizzctl --debug effect rainbow
136
+ ```
137
+
138
+ Shows the raw frames and handshake bytes sent over HID.
139
+
140
+ ## Dev tools
141
+
142
+ The `fizzctl-dev` binary exposes the full reverse-engineering toolkit
143
+ (capture inspect, diff, export, replay) in addition to all user commands.
144
+
145
+ ```bash
146
+ fizzctl-dev inspect captures/r3.json
147
+ fizzctl-dev diff captures/r2.json captures/r3.json
148
+ fizzctl-dev export captures/r2.json frames.json
149
+ fizzctl-dev replay frames.json
150
+ fizzctl-dev cfg Cfg.ini
151
+ fizzctl-dev list
152
+ ```
153
+
154
+ ## How the RGB paths work
155
+
156
+ **Flash writes** (`rgb`, `key`, `paint`, `effect`, `keymap`) send a 4-5 frame
157
+ burst through the vendor HID interface (`258a:0049`, interface 1, usage page
158
+ `0xFF00`). The sequence ends with a `5AA5` magic commit that writes to flash.
159
+ Colors persist across reboots. Keys not listed in a `key` or `paint` canvas
160
+ turn off.
161
+
162
+ **Animations** (`animate`) stream 382-byte per-key reports at the requested
163
+ frame rate with no flash commit. They are host-side only and lost on
164
+ reconnect.
165
+
166
+ ## Colors
167
+
168
+ Colors can be given as a name or `RRGGBB` hex (with or without `#`). Spaces,
169
+ dashes and underscores in names are ignored, so `light green`, `light-green`
170
+ and `lightgreen` are equivalent:
171
+
172
+ ```text
173
+ red green blue white black off
174
+ yellow cyan magenta orange pink purple lime teal violet indigo coral salmon
175
+ navy brown gold silver gray grey olive maroon
176
+ lightred lightgreen lightblue darkred darkgreen darkblue
177
+ ```
178
+
179
+ Both `-c yellow` and `--color ffaa00` work anywhere a color flag is accepted.
@@ -0,0 +1,15 @@
1
+ fizzctl/__init__.py,sha256=u5xtNuChnfsZDbitOyropXhjaPTOmWISwdlTx25wgBA,357
2
+ fizzctl/animations.py,sha256=jUDA-GP19MzJKgTLaNKRzRbyaumPje8um3qimKeB-LY,4937
3
+ fizzctl/blobs.py,sha256=AqB6tzOnKO31Gdwpa2fAXByTjZbAyfZyrR7rcs4ikKY,22056
4
+ fizzctl/capture.py,sha256=bKMofNzSuzfpdcnLKu1c2XnFWqzzVky09hRLQW58mmc,7488
5
+ fizzctl/cfg.py,sha256=zOuFgSofoF7dt3Gli-fKdv5_Oqbr3seIlJKQOiKwwjM,4857
6
+ fizzctl/cli.py,sha256=6k4MY-8HQNPeMI1vvsluHioxu7TB4ESC-ZKEhVgZDy8,14312
7
+ fizzctl/effects.py,sha256=HjAGbdKZN0RA0rsL6thGtrtV-hz4Djq5YSnK3Pcq2Fw,9989
8
+ fizzctl/hid.py,sha256=wnJh1Diztfy5STkiTUpZaGHSaBpXUhdkE6Epn2QmYNo,8860
9
+ fizzctl/keymap.py,sha256=KgmjETVSDkTVUZ3sjVUSXo5Ems_07qHMy9pOW93O-2U,6387
10
+ fizzctl/protocol.py,sha256=htTjPKTNVgQhuOlac9kkTW6vUEJNAijy0lD_XfBMwGA,3597
11
+ fizzctl/udev_rules.py,sha256=aFvGMqUBhkql9mVLp6oJyzc9VRwQzfOhy-ZUPIbz6Z4,3272
12
+ fizzctl-0.2.0.dist-info/WHEEL,sha256=_d8F1e7SqtoW6CDj4Gi8lFC26a_7I17R7zPLCKTp4Fg,81
13
+ fizzctl-0.2.0.dist-info/entry_points.txt,sha256=jnEQru2UrKpaDSd0zljE1Rgbh2_Uxz8Eta5c01gEk3k,73
14
+ fizzctl-0.2.0.dist-info/METADATA,sha256=ZSW-6v8idkufmEMOd3QzGy0uAY6tF5ctz3ml8tMRny0,5412
15
+ fizzctl-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.12.15
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ fizzctl = fizzctl:main
3
+ fizzctl-dev = fizzctl:main_dev
4
+