16 |
my $disk_blk_size = 512; |
my $disk_blk_size = 512; |
17 |
|
|
18 |
my $debug = shift @ARGV; |
my $debug = shift @ARGV; |
19 |
my $awesome = 1; |
my $awesome = 3; |
20 |
|
|
21 |
$|=1; |
$|=1; |
22 |
|
|
186 |
my $d_write = ( $d_w - $ld_w ) / $dt; |
my $d_write = ( $d_w - $ld_w ) / $dt; |
187 |
( $ld_r, $ld_w ) = ( $d_r, $d_w ); |
( $ld_r, $ld_w ) = ( $d_r, $d_w ); |
188 |
|
|
189 |
my $out = sprintf("%s | %s |%5s D %-5s|%5s > %-5s| %s%s\n", |
my $out = sprintf("%s | %s |%5s D %-5s|%5s > %-5s| %s%s", |
190 |
$s, |
$s, |
191 |
$load, |
$load, |
192 |
unit( $d_read ), unit( $d_write ), |
unit( $d_read ), unit( $d_write ), |
194 |
$bat, $temp, |
$bat, $temp, |
195 |
); |
); |
196 |
|
|
197 |
print $out; |
print "$out\n"; |
198 |
if ( $awesome ) { |
if ( $awesome ) { |
199 |
open(my $fh, '|-', 'awesome-client') || die "can't pipe to awesome-client: $!"; |
open(my $fh, '|-', 'awesome-client') || die "can't pipe to awesome-client: $!"; |
200 |
print $fh "0 widget_tell mystatusbar dwm-status text $out\n"; |
print $fh |
201 |
|
$awesome == 3 ? qq{mytextbox.text="$out"\n} |
202 |
|
: "0 widget_tell mystatusbar dwm-status text $out\n" |
203 |
|
; |
204 |
close($fh); |
close($fh); |
205 |
} |
} |
206 |
|
|