Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by jftuga

2 years ago

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
    }

0 comments

jftuga

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities