Hey guys, I would love to create an automation that'll show battery percentage when battery level goes under 10% and hide the percentage when it's above 10%.
I would appreciate any script that can toggle battery percentage in menubar. Guess I can create a custom trigger based on it.
Hello world, after months of research I came across a topic on a magnificent website called https://www.macscripter.net, where a guy named Dirk has revealed the perfect solution to what I wanted to achieve in my previous post.
Here's an script to turn the native battery percentage on:
do shell script "defaults -currentHost write com.apple.controlcenter BatteryShowPercentage -bool true"
And to toggle it off:
do shell script "defaults -currentHost write com.apple.controlcenter BatteryShowPercentage -bool false"
Easy as that! I've now created automations to turn the battery percentage on when it's lower than 10% and turn it off when it's higher. Hooray!
1 Like