polybar / polybar-scripts

This is a community project. We write and collect scripts for polybar!
The Unlicense
2.46k stars 338 forks source link

system-bluetooth-bluetoothctl: add bluetooth battery reporting #435

Closed maxdswain closed 1 year ago

maxdswain commented 1 year ago

This commit adds the printing of the Bluetooth device battery percentage to the script.

x70b1 commented 1 year ago

Oh yeah, thats a feature I always liked to work on. I will check it later.

maxdswain commented 1 year ago

Maybe its simpler to grep for that info in the output instead of changing the device mac style and use a longer dbus command?

Yep this is a better idea.

On top of that we need a condition which checks if we find a value there or not as not every device has a battery.

I have added this feature and changed the script in the way suggested above.