Created
November 14, 2013 00:48
-
-
Save cedriczirtacic/7459317 to your computer and use it in GitHub Desktop.
Quick way to get current battery status (tested on Fedora 18).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( cd /sys/class/power_supply/BAT1/ && perl -e "printf(\"%%%d\n\",(( "`cat charge_now`" / "`cat charge_full`" ) * 100));" ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment