Hacker News new | past | comments | ask | show | jobs | submit
I have this .zshrc function to track the battery and charging, which uses pmset:

    function batt-info() {
        echo
        system_profiler SPPowerDataType | grep Wattage | cut -c 7-
        echo
        pmset -g batt
    }