i3status-rust
i3status-rust copied to clipboard
Bluetooth block UPower fallback
Some devices do not report the battery via bluez; for these devices getting power from UPower should be a good alternative.
I wrote a quick fix for this, adding upower_device to the Bluetooth config block in my fork
Edit: Patch doesn't self update, unsure on how to fix it.
I'm not sure I really understand this. Will UPower always have battery information, even if it is not available through bluez? I was not aware that there was any interaction between the two.
No, won’t always have it, but the vast majority of my devices aren’t reported through bluez but are reported in UPower. The only device that I own that is Bluetooth and isn’t reported via UPower is the Apple AirPods.
Coming back to this now that I have a BT device which only implements battery via UPower, it does seem pretty handy. Otherwise you need to have two blocks in your config for your device (one bluetooth and one battery).
@Fuzen-py Is your fork still around?
Hi @ammgws, this would help me with my keyboard bluetooth device, it does report its battery level via Upower.
What should be done to help push this feature forward ?
Device: /org/freedesktop/UPower/devices/battery_hid_dco2co26o3ao64o00_battery
native-path: hid-dc:2c:26:3a:64:00-battery
model: Keychron K7
serial: dc:2c:26:3a:64:00
power supply: no
has history: yes
has statistics: yes
keyboard
present: yes
rechargeable: yes
state: discharging
warning-level: none
percentage: 77%
icon-name: 'battery-full-symbolic'
History (charge):
1696118330 77.000 discharging
1696118330 0.000 unknown
1696118300 77.000 discharging
1696118300 0.000 unknown
1696118270 77.000 discharging
1696118270 0.000 unknown
History (rate):
1696118330 0.000 unknown
1696118300 0.000 unknown
1696118270 0.000 unknown
Maybe we should also add the fact that charging/discharging state should be shown/configurable
@LovingMelody is your fork still usable or your block inside your fork ? is it usable with latest upstream stable i3status rust version ? or you're not using i3status-rust anymore ? and I should give it a try ?
I am no longer using i3-status I'm using waybar now. Looks like my fork is also gone.
it does report its battery level via Upower.
You could try merge_with_next to join bluetooth and battery blocks together.
e.g.
[[block]]
block = "bluetooth"
mac = "F0:BC:F1:E6:57:5F"
merge_with_next = true
[[block]]
block = "battery"
driver = "upower"
device = "ps-controller-battery-f0:bc:f1:e6:57:5f"
missing_format = ""