Tool to change the LED effects on a Logitech G203

a691e8c Fix repository link in man page

~hannes pushed to ~hannes/g203ctl git

3 months ago

50f8612 Yup, it also builds on Linux

~hannes pushed to ~hannes/g203ctl git

3 months ago


This is a tool to change the LED effects and the DPI setting on a Logitech G203. It's pretty much a port of the tool g203-led by smasty (https://github.com/smasty/g203-led). But this one is written in Zig.


Build requirements:

  • libusb
  • scdoc (for generating the man page)
  • Zig

Run the following commands to build and install g203ctl. Feel free to adjust the prefix (set with -p) to your needs.

zig build -Doptimize=ReleaseSmall
zig build install -p /usr/local

Uninstallation is possible with:

zig build uninstall -p /usr/local


See g203ctl(1).


  • While this application should work with the Logitech G203 Prodigy mouse as well, this was never tested. If you can confirm that this application works on the Prodigy version, feel free to let me know and I can remove this disclaimer. (I only own the Lightsync version.)
  • This is the first program that I've written with Zig. Some parts may look horrible for an advanced Zig programmer. If you notice any ugly workarounds and you're able to fix them, I'm more than happy to include your patches. I'm not very proud of some of the stuff that I wrote here. But as of now, I simply don't know of a better solution. That being said, the application should still work as expected. I don't think I've left any serious big bugs in there. At least I hope so...
  • This was also the first time that I've worked with libusb and USB communication in general. Everything appears to be working. But I'm still not that experienced with this. So if you think that something isn't quite done the right way, you might be correct. Just let me know.
  • I have no clue what the "intro" effect is supposed to do. Nothing changes on my mouse (Lightsync). I also never touched the original Logitech software. I just ported it over from g203-led in case it's doing something for others. Let me know if you know what this is for.


Send patches/bug reports to ~hannes/public-inbox@lists.sr.ht. Visit https://git-send-email.io/ for a tutorial on how to send patches via email.


This software is released under the terms of the GNU General Public License 3.