From 58972854dda493e9c55965ec0c73a8698e100377 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 9 Nov 2010 21:39:36 +0000 Subject: colors --- loadbars.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/loadbars.pl b/loadbars.pl index 2d8a1a2..7b03913 100755 --- a/loadbars.pl +++ b/loadbars.pl @@ -241,11 +241,13 @@ sub graph_stats ($$) { $app->fill($rect_system, $load_average{system} > 30 ? $colors->{purple} : $colors->{blue}); - $app->fill($rect_user, $system_n_user > 97 + $app->fill($rect_user, $system_n_user > 90 ? $colors->{red} : ( $system_n_user > 70 ? $colors->{orange} - : $colors->{yellow})); + : ( $system_n_user > 50 + ? $colors->{yellow0} + : $colors->{yellow}))); $app->update($_) for $rect_nice, $rect_iowait, $rect_system, $rect_user; $x += $width + 1; @@ -269,7 +271,8 @@ sub display_stats () { my $colors = { red => SDL::Color->new(-r => 0xff, -g => 0x00, -b => 0x00), orange => SDL::Color->new(-r => 0xff, -g => 0x70, -b => 0x00), - yellow => SDL::Color->new(-r => 0xff, -g => 0xa0, -b => 0x00), + yellow0 => SDL::Color->new(-r => 0xff, -g => 0xa0, -b => 0x00), + yellow => SDL::Color->new(-r => 0xff, -g => 0xc0, -b => 0x00), green => SDL::Color->new(-r => 0x00, -g => 0x90, -b => 0x00), blue => SDL::Color->new(-r => 0x00, -g => 0x00, -b => 0xff), purple => SDL::Color->new(-r => 0xa0, -g => 0x20, -b => 0xf0), -- cgit v1.2.3