diff options
| author | pbuetow (lap824) <puppet@mx.buetow.org> | 2012-01-22 12:46:33 +0100 |
|---|---|---|
| committer | pbuetow (lap824) <puppet@mx.buetow.org> | 2012-01-22 12:46:33 +0100 |
| commit | 47092043581b49d46732e64ef8684778801d5a44 (patch) | |
| tree | 939f37b0f77155ae30a3a68e1a2981276bc5d7e3 | |
| parent | 578434adcdc2a1c516983657dbd103101ed2f93a (diff) | |
fix is_host_summary stuff
| -rwxr-xr-x | loadbars | 33 |
1 files changed, 22 insertions, 11 deletions
@@ -442,18 +442,26 @@ sub main_loop ($@) { my $add_x = 0; my ($rect_memused, $rect_memfree, $rect_buffers, $rect_cached, $rect_swapused, $rect_swapfree); - if ( $is_host_summary && $C{showcores} ) { - $current_corenum = 0; - $rect_separator = get_rect $rects, "$key;separator"; - $rect_separator->width(1); - $rect_separator->height( $C{height} ); - $rect_separator->x( $x - 1 ); - $rect_separator->y(0); - $app->fill( $rect_separator, Loadbars::GREY ); - } + if ( $is_host_summary ) { + if ( $C{showmem} ) { + $rect_memused = get_rect $rects, "$host;memused"; + $rect_memfree = get_rect $rects, "$host;memfree"; + $rect_buffers = get_rect $rects, "$host;buffers"; + $rect_cached = get_rect $rects, "$host;cached"; + $rect_swapused = get_rect $rects, "$host;swapused"; + $rect_swapfree = get_rect $rects, "$host;swapfree"; + $add_x = $width + 1, + } - if ($C{showmem} && $name eq 'cpu') { - $add_x = $width + 1, + if ( $C{showcores} ) { + $current_corenum = 0; + $rect_separator = get_rect $rects, "$key;separator"; + $rect_separator->width(1); + $rect_separator->height( $C{height} ); + $rect_separator->x( $x - 1 ); + $rect_separator->y(0); + $app->fill( $rect_separator, Loadbars::GREY ); + } } $y = $C{height} - $heights{system}; @@ -510,6 +518,9 @@ sub main_loop ($@) { $rect_steal->x($x); $rect_steal->y($y); + if ( $C{showcores} ) { + } + my $all = 100 - $cpuaverage->{idle}; my $max_all = 0; |
