/[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 95 by dpavlin, Sat Oct 25 21:42:24 2008 UTC revision 96 by dpavlin, Sun Oct 26 23:12:16 2008 UTC
# Line 100  while ( 1 ) { Line 100  while ( 1 ) {
100          my $s = strftime("%Y-%m-%d %H:%M:%S", localtime());          my $s = strftime("%Y-%m-%d %H:%M:%S", localtime());
101    
102          if ( $i % $acpi_every == 0 ) {          if ( $i % $acpi_every == 0 ) {
103                  if ( -e $sys_fs ) {                  my $sysfs_path = glob "$sys_fs/*_full";
104                    if ( $sysfs_path ) {
105    
106                          my $path = glob "$sys_fs/*_full";                          my $full = read_file( $sysfs_path );
107                          my $full = read_file( $path );                          $sysfs_path =~ s/_full/_now/;
108                          $path =~ s/_full/_now/;                          my $now = read_file( $sysfs_path );
                         my $now = read_file( $path );  
109                          $bat = sprintf("%2d%% | ", $now * 100 / $full );                          $bat = sprintf("%2d%% | ", $now * 100 / $full );
110    
111                  } elsif ( $proc_acpi_battery ) {                  } elsif ( $proc_acpi_battery ) {

Legend:
Removed from v.95  
changed lines
  Added in v.96

  ViewVC Help
Powered by ViewVC 1.1.26