/[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 33 by dpavlin, Sun May 27 08:41:53 2007 UTC revision 34 by dpavlin, Sun May 27 08:54:17 2007 UTC
# Line 45  sub unit { Line 45  sub unit {
45          }          }
46    
47          if ( $v >= 1 ) {          if ( $v >= 1 ) {
48                  return sprintf("%d%s/s", $v, $units[$o]);                  return sprintf("%d%s", $v, $units[$o]);
49          } elsif ( $v == 0 ) {          } elsif ( $v == 0 ) {
50                  return '';                  return '';
51          } else {          } else {
52                  return sprintf("%.1f%s/s", $v, $units[$o]);                  return sprintf("%.1f%s", $v, $units[$o]);
53          }          }
54  }  }
55    
# Line 118  while ( 1 ) { Line 118  while ( 1 ) {
118          my $t = ( $tx - $ltx ) / $dt;          my $t = ( $tx - $ltx ) / $dt;
119          ( $lrx, $ltx ) = ( $rx, $tx );          ( $lrx, $ltx ) = ( $rx, $tx );
120    
121          printf "%s | %s |%6s >> %-6s| %s%s\n", $s, $load, unit( $r ), unit( $t ), $bat, $temp;          printf "%s | %s |%5s > %-5s| %s%s\n", $s, $load, unit( $r ), unit( $t ), $bat, $temp;
122    
123          sleep $dt;          sleep $dt;
124  }  }

Legend:
Removed from v.33  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26