--- trunk/dwm-status.pl 2007/05/27 19:31:52 37 +++ trunk/dwm-status.pl 2007/05/29 11:44:46 38 @@ -29,7 +29,7 @@ $value =~ s/ m[VW]h*$//; $h->{$key} = $value; } - warn dump( $h ) if ( $debug ); + warn "$f ",dump( $h ) if ( $debug ); return $h; } @@ -74,6 +74,7 @@ my $pcnt = $state->{'remaining capacity'} / $info->{'design capacity'}; my $time = $state->{'remaining capacity'} / ( $state->{'present rate'} ); + $time = ( $info->{'design capacity'} - $state->{'remaining capacity'} ) / $state->{'present rate'} if ( $state->{'charging state'} eq 'charging' ); warn "time = $time\n" if ($debug);