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 |
Pulsar (VID 0x3710), XS-1 platform |
X2A v3 eS Mini | wired and 8K dongle (PID 0x5403) |
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: normal, green = charging, red = ≤20%, gray = stale/no data. Normal is white on a dark taskbar and near-black on a light one; the icon follows light/dark mode
- Digits are drawn at the tray's real pixel size with the same font and smoothing as the taskbar clock
- Tooltip shows model name, percentage, charging state, polling rate, and battery voltage (Pulsar only)
- Left-click = refresh now; right-click = menu with Refresh, Polling rate, Icon style, Start with Windows, Exit
- Icon style picks what the icon shows: the digits alone (default), digits with a small battery glyph above or below, or the battery glyph alone — the glyph is filled to the charge level
- Polling rate lists the rates the current link supports with the active one checked; picking one writes it to the mouse, the same setting the vendor's web driver changes. Pulsar: 125 Hz–1 kHz on cable, up to 8 kHz on the 8K dongle (the X2A v3 Mini also does 8 kHz on its cable). VAXEE: 500 Hz–4 kHz on the 4K dongle (1 kHz max on cable or in a "Standard" tracking mode)
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). Releases are built with the MSVC toolchain
(x86_64-pc-windows-msvc); the GNU toolchain (x86_64-pc-windows-gnu) also builds and passes the tests.
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 and the Pulsar XS-1 mice (X2A v3) don’t expose voltage. VAXEE also reports in 5% steps.
The X2A v3’s 8K dongle can’t tell "mouse asleep" from "still waiting", so a sleeping mouse just shows the stale reading until it wakes and the next poll lands.
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. The settings register map (polling rate at address0x0000, link type from the0x01info reply) comes from packerlschupfer/pulsar-mouse-linux and andrewrabert/python-pulsar-mouse-tool - Pulsar XS-1 (X2A v3 / X3 family): 64-byte feature-report protocol and its pending/answer handshake as documented by santoshpanna/Pulsar-X3-Web-Config, packerlschupfer/pulsar-mouse-linux and OpenMouse
- VAXEE: feature-report protocol documented in stuffz/mouse-battery-monitor;
the polling-rate (
0x07) and tracking-mode (0x08) commands follow the VAXEE Control Center web driver
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 only thing it ever writes to a mouse is the polling rate you
pick from the menu. The "Start with Windows" toggle writes one value under
HKCU\Software\Microsoft\Windows\CurrentVersion\Run, and the Icon style choice is
saved under HKCU\Software\mousebatt. To match the icon to the taskbar it reads the
colour of a few taskbar pixels next to the notification area each time it polls the
mouse; nothing else on screen is read.
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.
