It was originally written for the XBox One controller since Microsoft dropped all visual hints for low battery, but it should work with any gamepad that can be addressed via XInput (which should be all controllers that work in XBox-controller-enabled games).

Controllers reported as working/being recognized so far:

  • XBOne + dongle
  • XBOne Elite + dongle
  • XBOne S + dongle
  • XBOne S + Bluetooth
  • XB360

Currently known issues/limitations:

  • initial recognition of a newly connected controller can take a while. It will be displayed as "waiting for battery level data" at first but should switch to battery level after ~10 seconds and a button press. (This might be a limitation of the XInput API.)