mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-14 12:37:16 +00:00
Fix always charging bug
This commit is contained in:
6
neofetch
6
neofetch
@@ -1709,7 +1709,11 @@ get_battery() {
|
||||
|
||||
"Mac OS X")
|
||||
battery="$(pmset -g batt | grep -o '[0-9]*%')"
|
||||
battery_state="$(pmset -g batt | awk 'NR==2 {print $3}')"
|
||||
state="$(pmset -g batt | awk '/;/ {print $4}')"
|
||||
if [ "$state" == "charging;" ];
|
||||
then
|
||||
battery_state="charging"
|
||||
fi
|
||||
;;
|
||||
|
||||
"Windows")
|
||||
|
||||
Reference in New Issue
Block a user