diff options
| author | Paul Buetow <paul@buetow.org> | 2012-06-23 20:10:52 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2012-06-23 20:10:52 +0200 |
| commit | dc0728da5e0037f471fa8e7136dd1517f1b68d9d (patch) | |
| tree | 964014915f4d066bc00ec5b86631fe6ede1d37db | |
| parent | 063fb63b6f3c7f6aa3d8ef6ca66f59ccea70e982 (diff) | |
screen update more early
| -rw-r--r-- | lib/Loadbars/Main.pm | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm index fc5221b..c82779b 100644 --- a/lib/Loadbars/Main.pm +++ b/lib/Loadbars/Main.pm @@ -639,6 +639,12 @@ sub loop ($@) { $app->fill( $rect_nice, Loadbars::Constants->GREEN ); $app->fill( $rect_iowait, Loadbars::Constants->PURPLE ); + $app->update( + $rect_idle, $rect_iowait, $rect_irq, + $rect_nice, $rect_softirq, $rect_steal, + $rect_guest, $rect_system, $rect_user, + ); + my $rect_memused = get_rect $rects, "$host;memused"; my $rect_memfree = get_rect $rects, "$host;memfree"; #my $rect_buffers = get_rect $rects, "$host;buffers"; @@ -707,6 +713,11 @@ sub loop ($@) { $app->fill( $rect_swapused, Loadbars::Constants->GREY ); $app->fill( $rect_swapfree, Loadbars::Constants->BLACK ); + $app->update( + $rect_memfree, $rect_memused, + $rect_swapused, $rect_swapfree + ) if $C{showmem}; + if ( $C{showtext} ) { my $y_ = 5; $app->print( $x + $add_x, $y_, 'Ram:' ); @@ -769,6 +780,11 @@ sub loop ($@) { $app->fill( $rect_tnetused, Loadbars::Constants->LIGHT_BLUE0 ); $app->fill( $rect_tnetfree, Loadbars::Constants->BLACK ); + $app->update( + $rect_netfree, $rect_netused, + $rect_tnetfree, $rect_tnetused + ) if $C{shownet}; + if ( $C{showtext} ) { my $y_ = 5; $app->print( $x + $add_x, $y_, 'Rx:' ); @@ -968,22 +984,6 @@ sub loop ($@) { } } - $app->update( - $rect_idle, $rect_iowait, $rect_irq, - $rect_nice, $rect_softirq, $rect_steal, - $rect_guest, $rect_system, $rect_user, - ); - - $app->update( - $rect_memfree, $rect_memused, - $rect_swapused, $rect_swapfree - ) if $C{showmem}; - - $app->update( - $rect_netfree, $rect_netused, - $rect_tnetfree, $rect_tnetused - ) if $C{shownet}; - $app->update($rect_separator) if defined $rect_separator; $x += $width + 1 + $add_x; |
