Closed keystroke3 closed 4 years ago
That is pretty normal. Bluetooth headsets send the battery level in multiples of 10, for example if the actual level is 73% it might say it is 70 or 80. That's why it's not accurate sometime and gives different values. It's better not to run the script too often and let the battery level change over a period of time to get a better result.
Ah, I see. I made a change in the script that makes it check every 5 min. In the version I showed you, I was testing it in a shell loop that cycled pretty fast. In it, it kept flipping so fast I thought it was a bug. Thanks anyway. You might consider submitting the script to Polybar-scripts. I can do a pull request if you like.
No problem. You can submit your fork. This one is just suitable for command line users.
I am trying to turn the script to a Polybar module so that I can have the battery information there. I have been successful in getting the values, and have made a few changes so that it shows an icon instead of just the level. Problem is, the values are not consistent. When I run this, it keeps flipping between two values e.g. 70 and 80%. I do not fully understand how the script works, so a little elaboration may help me understand.