A tiny Windows system-tray battery monitor for Pulsar and VAXEE wireless gaming mice. The current battery percentage is drawn directly onto the tray icon.
- ~300 KB single exe, no runtime, no installer
- Zero CPU while idle — event-driven Win32, no polling threads
- Pure Rust; the only dependency is
windows-sys(no hidapi, no GUI framework)
| Vendor | Tested with | Connection |
|---|---|---|
Pulsar (VID 0x3710) |
X3 LHD CrazyLight mini / Medium | wired and 8K Dongle Gen.2 |
VAXEE (VID 0x3057) |
XE-S | 4K wireless dongle |
Other mice from these vendors that use the same receivers/firmware will likely work, since devices are matched by vendor ID + HID usage page rather than specific product IDs.
- Polls the mouse every 4 minutes over the vendor HID interface
- Re-reads immediately when a USB device is plugged/unplugged (debounced) and on resume from sleep
- Icon text color: white = normal, green = charging, red = ≤20%, gray = stale/no data
- Tooltip shows model name, percentage, charging state, and battery voltage (Pulsar only)
- Left-click = refresh now; right-click = menu with Refresh, Start with Windows, Exit
If the mouse is asleep and doesn't answer, the last known value is shown in gray and marked stale in the tooltip — it recovers on the next poll.
Grab mousebatt.exe from the latest release
and run it — there is nothing to install. Use Start with Windows in the right-click menu
to have it launch at logon.
The exe is not code-signed, so SmartScreen will warn the first time you run it (More info → Run anyway). Each release lists the SHA-256 of the binary if you want to verify it.
Requires the Rust toolchain (1.80 or newer) with the MSVC target.
cargo build --release
The binary lands in target/release/mousebatt.exe. Run it — it lives entirely in the tray.
Windows 11 hides new tray icons in the overflow flyout by default; drag it onto the
taskbar (or enable it under taskbar settings) to keep it visible.
These mice estimate charge from battery voltage (no coulomb counting), so the percentage jumps up when you plug in and sags back when you unplug — that's the firmware's estimate, not a bug here. Treat readings as roughly ±10%. VAXEE reports in 5% steps and does not expose voltage.
Polling happens over the wireless link, so the interval defaults to 4 minutes (POLL_INTERVAL_MS in src/main.rs).
The vendor protocols were reverse-engineered by the community:
- Pulsar: same protocol as the Linux
hid-kysonadriver (17-byte report08 04 … 49; battery %, charging flag, and voltage in the reply), also documented via jonkristian/pulsar-x3-python - VAXEE: feature-report protocol documented in stuffz/mouse-battery-monitor
mousebatt makes no network connections and collects nothing. It only opens HID
interfaces whose vendor ID is Pulsar or VAXEE, sends the vendor's battery query,
and reads the reply. The "Start with Windows" toggle writes one value under
HKCU\Software\Microsoft\Windows\CurrentVersion\Run.
Devices are matched by vendor ID and HID usage page in src/protocol.rs
(read_battery), and the two vendor protocols live in the same file as pure
functions with unit tests. To add support for another mouse:
- Find its VID/PID and the vendor-specific usage page (Device Manager → Details → Hardware Ids, or any HID enumeration tool).
- Work out the battery request/response — the linked projects below and the Linux
hid-*drivers are the best starting points. - Add a
parse_*function with a test using a captured reply, and a branch inread_battery.
Issues and PRs for other Pulsar/VAXEE models (or other vendors) are welcome; please include the product string from the tooltip and, ideally, a captured report.
MIT.
