File battery_only_quickfix.patch of Package solaar
Description: quick fix to show only battery status.
This is a hack, using battery as devicename just shows the battery status of
device "1". A clean fix would allow additional options to show.
Author: Mischa Sallé <mischa.salle@gmail.com>
--- a/lib/solaar/cli/show.py 2022-04-25 15:05:50.000000000 +0200
+++ b/lib/solaar/cli/show.py 2022-05-29 11:10:51.435898638 +0200
@@ -309,6 +309,13 @@
device_name = args.device.lower()
+ if device_name == 'battery':
+ dev = next(find_device(devices, "1"), None)
+ if not dev:
+ raise Exception("no device found")
+ _battery_line(dev)
+ return
+
if device_name == "all":
for d in devices:
if isinstance(d, _receiver.Receiver):