JavaScript Mapping Library
I’m a big fan of having as much information as I can get within the command line. I couldn’t go without knowing which git branch I’m on, for example. Another important piece of information I like having is my current battery percentage.
To get the current battery level from command line, you can run:
pmset -g batt | grep -Eo "\d+%"
Since I get lost in command line for hours at a time, having the percentage present saves me the labor of shifting my eyes outside of shell. What information do you like having in your command line?
The post How to Get Mac Battery Level from Command Line appeared first on David Walsh Blog.
David Walsh Blog
You must be logged in to post a comment.
This site uses Akismet to reduce spam. Learn how your comment data is processed.