Open epokuser opened 1 year ago
btw how can I use this? do i just run the script ?
Hi there! It will work for any keyboard that has an info.json
file containing a layout
within its rgb_matrix
property. An example is the Drop Sense75 which looks like this:
...
"rgb_matrix":
...
"layout": [
{"flags": 2, "x": 2, "y": 0},
{"flags": 2, "x": 22, "y": 0},
{"flags": 2, "x": 42, "y": 0},
{"flags": 2, "x": 62, "y": 0},
{"flags": 2, "x": 82, "y": 0},
{"flags": 2, "x": 102, "y": 0},
{"flags": 2, "x": 122, "y": 0},
{"flags": 2, "x": 142, "y": 0},
{"flags": 2, "x": 162, "y": 0},
{"flags": 2, "x": 182, "y": 0},
{"flags": 2, "x": 202, "y": 0},
{"flags": 2, "x": 222, "y": 0},
{"flags": 2, "x": 0, "y": 7},
{"flags": 4, "matrix": [0, 0], "x": 6, "y": 8},
{"flags": 4, "matrix": [0, 1], "x": 24, "y": 8},
{"flags": 4, "matrix": [0, 2], "x": 37, "y": 8},
{"flags": 4, "matrix": [0, 3], "x": 51, "y": 8},
{"flags": 4, "matrix": [0, 4], "x": 66, "y": 8},
{"flags": 4, "matrix": [0, 5], "x": 82, "y": 8},
...
To run the script, pass in the path to the file (or a glob expression to multiple files) and it will read it and generate the plugin. e.g.:
python ./qmk2srgb.py path/to/my/info.json -o generated
You can get those files from the qmk_firmware repo, but I'll save you some time, all of the (limited number of) keyboards this generator currently works with have plugins in the srgbmods repo in the needs-testing branch: https://github.com/SRGBmods/qmk-plugins/tree/needs-testing
Simply add that as an addon in SignalRGB and point it at that branch and you'll have all the extra plugins it can generate today. I believe the SRBGmods people are trying to backfill this information for the various keyboards (they're currently experimenting with the Keychron K4 Pro)
any qmk keyboard , any layout?