From dc0728da5e0037f471fa8e7136dd1517f1b68d9d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 23 Jun 2012 20:10:52 +0200 Subject: screen update more early --- lib/Loadbars/Main.pm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/Loadbars') 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; -- cgit v1.2.3