/[scripts]/trunk/dwm-status.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/dwm-status.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 37 by dpavlin, Sun May 27 19:31:52 2007 UTC revision 38 by dpavlin, Tue May 29 11:44:46 2007 UTC
# Line 29  sub proc2hash { Line 29  sub proc2hash {
29                  $value =~ s/ m[VW]h*$//;                  $value =~ s/ m[VW]h*$//;
30                  $h->{$key} = $value;                  $h->{$key} = $value;
31          }          }
32          warn dump( $h ) if ( $debug );          warn "$f ",dump( $h ) if ( $debug );
33          return $h;          return $h;
34  }  }
35    
# Line 74  while ( 1 ) { Line 74  while ( 1 ) {
74                          my $pcnt = $state->{'remaining capacity'} / $info->{'design capacity'};                          my $pcnt = $state->{'remaining capacity'} / $info->{'design capacity'};
75    
76                          my $time = $state->{'remaining capacity'} / ( $state->{'present rate'} );                          my $time = $state->{'remaining capacity'} / ( $state->{'present rate'} );
77                            $time = ( $info->{'design capacity'} - $state->{'remaining capacity'} ) / $state->{'present rate'} if ( $state->{'charging state'} eq 'charging' );
78    
79                          warn "time = $time\n" if ($debug);                          warn "time = $time\n" if ($debug);
80    

Legend:
Removed from v.37  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26