From 7d35f2110fdf5478e6abb9cdda86071b32802e41 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Fri, 26 Sep 2025 10:37:24 +0200 Subject: capibarra: small fixes Signed-off-by: Guillermo Ramos --- capibarra | 12 +++++++----- 1 file 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 }; }, }; -- cgit v1.2.3