summaryrefslogtreecommitdiff
path: root/bin/vdf
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-10-27 18:31:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-10-27 18:31:02 +0200
commit24b16a2aaa44d2c2caf4cfaf9e4ec5588e615080 (patch)
tree1f610379e8136ef7b18403a81cb2c549cc66e909 /bin/vdf
parent4ec7e4330df5baf6525cb20d22e4edb3cdafbf44 (diff)
Add vzds
Diffstat (limited to 'bin/vdf')
-rwxr-xr-xbin/vdf13
1 files changed, 7 insertions, 6 deletions
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);
}