Sunday, December 4, 2016

Battery Status Linux

upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percentage"

amesh@linux-3ykp:~> upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percent
age"
   state:               charging
   time to full:        58.8 minutes
   percentage:          69%
ramesh@linux-3ykp:~> upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percent
age"
   state:               discharging
   time to empty:       32.0 hours
   percentage:          70%

No comments:

Post a Comment