fix: rewrite sb-internet test for wifi

This commit is contained in:
David JULIEN 2021-09-03 22:58:34 +02:00
parent b7a0415567
commit ea4fc5cf32
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@
# 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 "睊")"
[ -n "$wifi" ] && str="$(printf "直 %3d%%" $wifi)" || str="$(printf "睊")"
eth="$(cat /sys/class/net/eno1/operstate)"
if [ "up" = "$eth" ]; then
str="$(printf "%s /  " "$str")"