fix: rewrite sb-internet test for wifi
This commit is contained in:
parent
b7a0415567
commit
ea4fc5cf32
@ -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")"
|
||||
|
Reference in New Issue
Block a user