summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbattery6
1 files changed, 2 insertions, 4 deletions
diff --git a/battery b/battery
index bba03d1..d2d4ba5 100755
--- a/battery
+++ b/battery
@@ -56,13 +56,12 @@ sub update {
my $full = $bs->{energy_full} // $bs->{charge_full};
my $deriv = $bs->{power_now} // $bs->{current_now};
- my $e=$now/$full;
+ my $fraction = $now/$full;
my $charging = lc($bs->{status}) eq 'charging';
my $is_full = lc($bs->{status}) eq 'full';
my @symbols;
my $time_estimate='';
- my $percentage=sprintf '%.0f%%', 100*$e;
- my $fraction=$e;
+ my $percentage=sprintf '%.0f%%', 100*$fraction;
if ($deriv) {
my $t=( $charging ? $full - $now : $now )/$deriv;
@@ -71,7 +70,6 @@ sub update {
$time_estimate = sprintf "%s/%s",
_format_time($t),
_format_time($tot);
- $fraction= $now / $full;
}
if ($charging) {