From 89802b26399b4e78020b101166b30bcffa706826 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 17 Oct 2023 19:25:25 +0200 Subject: [PATCH] statusbar: added special case for inet --- .local/bin/tools/statusbar/internet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/tools/statusbar/internet b/.local/bin/tools/statusbar/internet index 50f5b4f..d1a474c 100755 --- a/.local/bin/tools/statusbar/internet +++ b/.local/bin/tools/statusbar/internet @@ -2,7 +2,8 @@ wifipercent=" " -([ "$(cat /sys/class/net/w*/operstate)" = 'down' ] || ! [[ "/sys/class/net/w*/operstate" ]]) && wifiicon="^c#ff0000^ ^d^" && wifipercent=0 +[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^" && wifipercent=0 +[[ "/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) }')