andyvorld / LGSTrayBattery

A tray app used to track battery levels of wireless Logitech mouse.
GNU General Public License v3.0
391 stars 33 forks source link

FR: Show when device is charging #73

Open CZonin opened 12 months ago

CZonin commented 12 months ago

Would it be possible to show an indicator on the tray icon when the device is charging?

andyvorld commented 11 months ago

Pre-release version 3.0 has this feature https://github.com/andyvorld/LGSTrayBattery/releases/tag/v3.0.0-rc.1

andyvorld commented 11 months ago

Please use https://github.com/andyvorld/LGSTrayBattery/releases/tag/v3.0.0-rc.2, instead. Had a packaging bug that caused the native manager to not run.

CZonin commented 11 months ago

Awesome! I'll give it a try when I get home later.

CZonin commented 11 months ago

Just tested it with my G502 X Plus. Battery displays properly with icon and numeric, but it charging status doesn't seem to show.

realgooseman commented 11 months ago

I tested version 3.0.0-rc.2 with my G703 mouse and G915 keyboard.

The switch to the "charging" icon indicator in tray menu is not automatic. When devices are plugged in you have to hit the "Rediscover Devices" button to trigger the switch to charging status (or inversely, back to battery percentage). So it needs to be automated instead of having to manually trigger it, for smoother experience.

CZonin commented 11 months ago

Ah okay got it that makes sense. I have a small charging pad that I charge my mouse on so can't really move it to refresh the status.

andyvorld commented 11 months ago

Yeah, due to the implementation with the native manager, the device is polled every 10min on succesful reads. However wire/wireless devices will cause a device arrival notification which instantly updates the icon. If you are using the GHUB manager on the other hand caches your battery status for a few seconds before updating.

I might make it an option to change the polling rate so that it can be more or less frequent.