aboutsummaryrefslogtreecommitdiff
path: root/capibarra
diff options
context:
space:
mode:
Diffstat (limited to 'capibarra')
-rwxr-xr-xcapibarra12
1 files changed, 7 insertions, 5 deletions
diff --git a/capibarra b/capibarra
index 8040883..ef6bdf2 100755
--- a/capibarra
+++ b/capibarra
@@ -83,10 +83,12 @@ $linux_mods{'MEM'} = {
period => 5,
default_opts => {'warn' => 70, 'err' => 90},
mkcompute => sub($opts) {
- my $mused = `free | awk '/^Mem:/ {printf("%d", 100 * (\$3/\$2))}'`;
- return {
- text => sprintf("MEM %s%%", $mused),
- color => color_thresholds($mused, $opts->{warn}, $opts->{err}),
+ return sub {
+ my $mused = `free | awk '/^Mem:/ {printf("%d", 100 * (\$3/\$2))}'`;
+ return {
+ text => sprintf("MEM %s%%", $mused),
+ color => color_thresholds($mused, $opts->{warn}, $opts->{err}),
+ };
};
},
};
@@ -111,7 +113,7 @@ $linux_mods{'NET'} = {
push @wired, [0, $if, $status, $addr] if (substr($if, 0, 2) eq 'en');
push @wireless, [1, $if, $status, $addr] if (substr($if, 0, 2) eq 'wl');
}
- return { text => join ' | ', map { render_iface_linux(@$_) } @wired, @wireless };
+ return { text => join ' ยท ', map { render_iface_linux(@$_) } @wired, @wireless };
},
};