diff options
| author | Paul Buetow <paul@buetow.org> | 2011-08-06 20:03:59 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-08-06 20:03:59 +0000 |
| commit | 37ad38f890bfe89b96b13a63abb5be4be256f3d2 (patch) | |
| tree | 1eee11420ea915d66d09d82d40f0d54ed8de339b /loadbars.pl | |
| parent | 694f761a16e3c810f64555332b8d9c01df9eb0f2 (diff) | |
Foo
Diffstat (limited to 'loadbars.pl')
| -rwxr-xr-x | loadbars.pl | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/loadbars.pl b/loadbars.pl index 7dc0b79..8d24866 100755 --- a/loadbars.pl +++ b/loadbars.pl @@ -68,7 +68,7 @@ use constant { USER_ORANGE => 70, USER_YELLOW0 => 50, NULL => 0, - DEBUG => 0, + DEBUG => 1, }; $| = 1; @@ -310,8 +310,32 @@ sub main_loop ($@) { $int -= 0.1; $CONF{inter} = $int > 0 ? $int : 0.1; $displayinfo = "Set graph update interval to $CONF{inter}"; - } +=cut + } elsif ($key_name eq 'down') { + my $height = $CONF{height} + 10; + $app->resize($CONF{width},$height); + $CONF{height} = $height; + $displayinfo = "Set graph height to $CONF{height}"; + } elsif ($key_name eq 'up') { + my $height = $CONF{height}; + $height -= 10; + $CONF{height} = $height > 1 ? $height : 1; + $app->resize($CONF{width},$CONF{height}); + $displayinfo = "Set graph height to $CONF{height}"; + + } elsif ($key_name eq 'right') { + $CONF{width} += 10; + $app->resize($CONF{width},$CONF{height}); + $displayinfo = "Set graph width to $CONF{width}"; + } elsif ($key_name eq 'left') { + my $width = $CONF{width}; + $width -= 10; + $CONF{width} = $width > 1 ? $width : 1; + $app->resize($CONF{width},$CONF{height}); + $displayinfo = "Set graph width to $CONF{width}"; +=cut + } } }; @@ -588,7 +612,8 @@ END } grep { $d_by_short{$_}{mode} & 1 and exists $d_by_short{$_}{help}; - } sort { $d_by_short{$a}{menupos} <=> $d_by_short{$b}{menupos} } sort keys %d_by_short); + } sort { $d_by_short{$a}{menupos} <=> $d_by_short{$b}{menupos} } sort keys %d_by_short) + . "\n$textdesc"; } elsif ($arg eq 'usage') { (join "\n", map { |
