You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pmset -g batt
Now drawing from 'AC Power'
-InternalBattery-0 (id=4718691) 100%; charged; 0:00 remaining present: true
$
$ eval `./angel-PS1`
angel installed.
Use of uninitialized value $1 in division (/) at ./angel-PS1 line 2183.
the following code can't parsing the result
return sub {
my $pmset_batt = `pmset -g batt`;
# 37%; AC attached; not charging
# 8%; charging; 2:46 remaining
# 9%; discharging; (no estimate)
# 7%; discharging; 0:13 remaining
$pmset_batt =~ m/\t([0-9]+)%;.* (dis)?charging/;
my $level = $1 / 100;
my $charging = ! defined $2;
return ($level, $charging);
}
The text was updated successfully, but these errors were encountered:
When 100% charged on MacOS.
the following code can't parsing the result
The text was updated successfully, but these errors were encountered: