--- trunk/dwm-status.pl 2007/05/27 15:30:12 36 +++ 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); @@ -108,6 +109,7 @@ foreach ( split(/\n/, $net) ) { s/^\s+//; + s/:\s+/:/; my @n = split(/\s+/, $_, 17); next unless ( $n[0] =~ s!(eth\d|ath\d):!! );