Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No percentage on Catalina #1905

Open
Clorr opened this issue Jan 27, 2023 · 2 comments
Open

No percentage on Catalina #1905

Clorr opened this issue Jan 27, 2023 · 2 comments
Labels

Comments

@Clorr
Copy link

Clorr commented Jan 27, 2023

Hi !

Thanks to this plugin that let me monitor my keyboard status. He's a little old and doesn't hold so much, so I needed this ;-)

However on Catalina, I had to add the -l flag in addition to the sell command, like this :

#!/bin/sh

# <xbar.title>Keybard Battery</xbar.title>
# <xbar.author>Mat Ryer</xbar.author>
# <xbar.author.github>matryer</xbar.author.github>

PERCENTAGE=$(ioreg -l -c AppleBluetoothHIDKeyboard | grep BatteryPercent | fgrep -v \{ | sed 's/[^[:digit:]]//g')

if [ "$PERCENTAGE" ]; then
        echo "KB: $PERCENTAGE%"
else
        echo "KB: ?%"
fi
@Clorr
Copy link
Author

Clorr commented Jan 27, 2023

Also little glitch, the o is missing in <xbar.title>Keybard Battery</xbar.title> ;-)

@sprak3000
Copy link
Sponsor Collaborator

FAO @matryer ☝🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants