From 6670354d1ac60ebfe3f45c28ab4e8480b0e86e17 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 17 Oct 2023 19:23:26 +0200 Subject: [PATCH] statusbar: added special case for inet --- .local/bin/tools/statusbar/internet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/tools/statusbar/internet b/.local/bin/tools/statusbar/internet index 99fa2da..50f5b4f 100755 --- a/.local/bin/tools/statusbar/internet +++ b/.local/bin/tools/statusbar/internet @@ -1,8 +1,8 @@ #!/usr/bin/env sh -wifipercent=" ___" +wifipercent=" " -[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^" +([ "$(cat /sys/class/net/w*/operstate)" = 'down' ] || ! [[ "/sys/class/net/w*/operstate" ]]) && wifiicon="^c#ff0000^ ^d^" && wifipercent=0 [ ! -n "${wifiicon+var}" ] && wifiicon="^c#dfdfdf^ ^d^" && wifipercent=$(grep "^\s*w" /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')