Skip to content

Commit

Permalink
Fixed battery status in MacOS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
thrushcat authored and Rycieos committed Jun 22, 2020
1 parent e3a16c4 commit fefbe01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liquidprompt
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ case "$LP_OS" in
{
(( LP_ENABLE_BATT )) || return 4
local percent batt_status
eval "$(pmset -g batt | sed -n 's/^ -InternalBattery[^ ]*[ ]\([0-9]*[0-9]\)%; \([^;]*\).*$/percent=\1 batt_status='\'\\2\'/p)"
eval "$(pmset -g batt | sed -n 's/^ -InternalBattery.*[[:space:]]\([0-9]*[0-9]\)%; \([^;]*\).*$/percent=\1 batt_status='\'\\2\'/p)"
case "$batt_status" in
charged | "")
return 4
Expand Down

0 comments on commit fefbe01

Please sign in to comment.