You are not logged in.
gobbl, short for Go Bluetooth Battery Level, is little utility I wrote few months back after getting a bluetooth keyboard and wanted to see it's current battery level in my WM's panel (and wanted an excuse to practice programming in Go ), and figured I'd share it!
It simply reads the available battery level via dbus for every bluetooth device that's both paired and connected, and prints it to STDOUT. Right now it only outputs info in either plaintext, or a JSON string that can be interpreted by Waybar, but it could be used with any bar or widget that can take input from a shell command! And I'd gladly merge in any additional formatting options, should anyone find this useful and want to contribute them.
Screenshot of the Waybar integration is on the github page
Offline
hi. I have tried goggl.
First, I know nothing about go I had to make a search to know that I needed to run `go build` to compile it. May be add that to the README.md or a makefile but this is over-kill, here.
And otherwise, gobbl is giving me -1% for 2 of my bluetooth devices. I have not tested others so far;
$ ./gobbl
JBL GO: -1%
$ ./gobbl -f Waybar
{"text":"JBL GO ?","tooltip":"JBL GO: ?","class":"$class"}
# disconnect that one and connect a sesh headphone wireless
$ ./gobbl
Sesh: -1%
$ ./gobbl -f Waybar
{"text":"Sesh ?","tooltip":"Sesh: ?","class":"$class"}
Offline
hi. I have tried goggl.
First, I know nothing about go I had to make a search to know that I needed to run `go build` to compile it. May be add that to the README.md or a makefile but this is over-kill, here.
And otherwise, gobbl is giving me -1% for 2 of my bluetooth devices. I have not tested others so far;
$ ./gobbl JBL GO: -1% $ ./gobbl -f Waybar {"text":"JBL GO ?","tooltip":"JBL GO: ?","class":"$class"} # disconnect that one and connect a sesh headphone wireless $ ./gobbl Sesh: -1% $ ./gobbl -f Waybar {"text":"Sesh ?","tooltip":"Sesh: ?","class":"$class"}
Noted, will add that to the repo. I have provided an AUR package as well, in the main post!
as for the issue, '-1%' or '?' means that blueZ isn't reporting a readable battery level to dbus. I run into this issue occasionally too, sometimes after resuming from suspend, or after my keyboard goes to sleep. I don't know if it's my onboard bluetooth, or something in blueZ that causes this. It could be that your BT devices just aren't reporting or can't report battery levels at all to dbus
When it happens to me, I just recycle bluetooth.service, and dbus can see battery levels again
# systemctl restart bluetooth.service
Let me know if that helps or not. Thanks for the feedback!
Last edited by SolarBoyMatt (2022-01-13 23:11:50)
Offline
Let me know if that helps or not. Thanks for the feedback!
unfortunately, it doesn't.
Offline