summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUGS3
-rw-r--r--CHANGELOG1
-rw-r--r--WISHLIST3
-rwxr-xr-xloadbars22
4 files changed, 19 insertions, 10 deletions
diff --git a/BUGS b/BUGS
index 4f27f4b..1305227 100644
--- a/BUGS
+++ b/BUGS
@@ -1 +1,2 @@
-* After quit ssh processes dont shut down instantly but later
+* After quit ssh processes don't shut down instantly. But this is not an issue
+ since whey will quit automatically after 'samples' times.
diff --git a/CHANGELOG b/CHANGELOG
index 8bd2c42..4b3de9e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
* Remove --width option but introduced --barwidth option
* Add auto width, each bars width is --barwidth, which is 40px by default
* Add online resize option (0 and 9 hotkeys)
+* Auto disable text display if text does not fit into screen
* Add stats for memory (--showmem option or m hotkey)
Sun Jan 21 14:16:37 CET 2012
diff --git a/WISHLIST b/WISHLIST
index 39c4066..a38f493 100644
--- a/WISHLIST
+++ b/WISHLIST
@@ -1,5 +1,4 @@
* Local configuration file for default values
-* Stats for memory
+* More stats for memory
* Stats for network
-* Adding and removing hosts online
* .deb for Debian and Ubuntu
diff --git a/loadbars b/loadbars
index 44b367b..ad513f3 100755
--- a/loadbars
+++ b/loadbars
@@ -262,10 +262,13 @@ sub display_info ($) {
sub set_dimensions ($$) {
my ($width, $height) = @_;
- if ($width > $C{maxwidth}) {
+ if ($width < 1) {
+ $C{width} = 1;
+
+ } elsif ($width > $C{maxwidth}) {
$C{width} = $C{maxwidth};
display_info "Don't set width to $width, it'd exceed maxwidth $C{maxwidth}. "
- . 'Disabling text display, text will be too large. '
+ . 'Disabling text display, text will not fit into screen. '
. 'It is possible to re-enable text display using the \'t\' hotkey';
$C{displaytxt} = 0;
$C{displaytxtoff} = 1;
@@ -280,7 +283,12 @@ sub set_dimensions ($$) {
$C{width} = $width;
}
- $C{height} = $height;
+ if ($height < 1) {
+ $C{height} = 1;
+
+ } else {
+ $C{height} = $height;
+ }
display_info "Resizing to $C{width}x$C{height}";
}
@@ -399,12 +407,12 @@ sub main_loop ($@) {
}
elsif ( $key_name eq '9' ) {
- $newsize{width} = $C{width} - $C{barwidth} / 2;
+ $newsize{width} = $C{width} - 100;
$newsize{height} = $C{height};
$resize_window = 1;
}
elsif ( $key_name eq '0' ) {
- $newsize{width} = $C{width} + $C{barwidth} / 2;
+ $newsize{width} = $C{width} + 100;
$newsize{height} = $C{height};
$resize_window = 1;
}
@@ -819,13 +827,13 @@ END
},
barwidth_hot_up => {
menupos => 5,
- help => 'Increase bar width by barwidth / 2',
+ help => 'Increase bar width by 100px',
cmd => '0',
mode => 1,
},
barwidth_hot_dn => {
menupos => 5,
- help => 'Decrease bar width by barwidth / 2',
+ help => 'Decrease bar width by 100px',
cmd => '9',
mode => 1,
},