From 9ee6d451d6c3143678636c73d69b3bbf3de3bdfe Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Mon, 12 Jul 2021 17:53:48 +0200 Subject: [PATCH] fix: remove '---' when wifi is down --- .local/bin/statusbar/sb-internet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet index f35864e..0b47f56 100755 --- a/.local/bin/statusbar/sb-internet +++ b/.local/bin/statusbar/sb-internet @@ -12,8 +12,8 @@ # Wifi quality percentage and  icon if ethernet is connected. wifi="$(grep "^\s*w" /proc/net/wireless | awk '{ printf int($3 * 100 / 70) }')" -[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊 ---")" -eth="$(cat /sys/class/net/enp0s25/operstate)" +[ $wifi -ne 0 ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊")" +eth="$(cat /sys/class/net/eno1/operstate)" if [ "up" = "$eth" ]; then str="$(printf "%s /  " "$str")" fi