From 24b16a2aaa44d2c2caf4cfaf9e4ec5588e615080 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 27 Oct 2010 18:31:02 +0200 Subject: Add vzds --- bin/vdf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bin/vdf') diff --git a/bin/vdf b/bin/vdf index 8967dc9..7cb826f 100755 --- a/bin/vdf +++ b/bin/vdf @@ -45,13 +45,14 @@ sub bar_png { my $black = $bar->colorAllocate( 0, 0, 0); my $gray = $bar->colorAllocate(127, 127, 127); + my $lgray = $bar->colorAllocate(191, 191, 191); my $white = $bar->colorAllocate(255, 255, 255); my $vwidth = sprintf("%d", ($w- 2) * $percent / 100); - $bar->rectangle(0, 0, $w - 1, $h - 1, $black); + $bar->rectangle(0, 0, $w - 1, $h - 1, $gray); $bar->filledRectangle(1, 1, $w - 2, $h - 2, $white); - $bar->filledRectangle(1, 1, $vwidth, $h - 2, $gray); + $bar->filledRectangle(1, 1, $vwidth, $h - 2, $lgray); return $bar; } @@ -107,7 +108,7 @@ sub show_df_png { my $black = $im->colorAllocate( 0, 0, 0); my $gray = $im->colorAllocate(127, 127, 127); - my $lgray = $im->colorAllocate(250, 250, 250); + my $lgray = $im->colorAllocate(191, 191, 191); my $white = $im->colorAllocate(255, 255, 255); $im->rectangle(0, 0, $w - 1, $h - 1, $gray); @@ -118,11 +119,11 @@ sub show_df_png { my $mount = $mounts[$i]; my $percent = $mount->[4]->{'used'} * 100 / $mount->[4]->{'blocks'}; - $im->string(gdSmallFont, 10, $spacing * $i + 2, $mount->[1], + $im->string(gdSmallFont, 10, $spacing * $i + 7, $mount->[1], $black); - $im->string(gdSmallFont, $w - 46, $spacing * $i + 2, + $im->string(gdSmallFont, $w - 46, $spacing * $i + 7, sprintf("%6s", format_size($mount->[4]->{'bavail'})), $black); - $im->copy(bar_png($percent, $w - 20, 10), 10, $spacing * $i + 15, 0, + $im->copy(bar_png($percent, $w - 20, 10), 10, $spacing * $i + 20, 0, 0, $w - 20, 10); } -- cgit v1.2.3