/[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 80 by dpavlin, Tue Jul 22 01:15:19 2008 UTC revision 81 by dpavlin, Tue Jul 22 01:16:52 2008 UTC
# Line 96  my $bat = ''; Line 96  my $bat = '';
96  my $i = 0;  my $i = 0;
97  my $sys_fs = '/sys/class/power_supply/BAT0';  my $sys_fs = '/sys/class/power_supply/BAT0';
98    
 sub read_file {  
         my $path = shift;  
         open(my $fh, '<', $path) || die "can't open $path: $!";  
         my $c = <$fh>;  
         chomp($c);  
         close($fh);  
         return $c;  
 }  
   
99  while ( 1 ) {  while ( 1 ) {
100          my $s = strftime("%Y-%m-%d %H:%M:%S", localtime());          my $s = strftime("%Y-%m-%d %H:%M:%S", localtime());
101    

Legend:
Removed from v.80  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.26