feat: do not compute wifi strength

only display ssid
tweak wifi tests
This commit is contained in:
David JULIEN 2021-09-19 12:30:30 +02:00
parent 7c0ffbf953
commit c2f0fa4e6a

View File

@ -11,9 +11,10 @@
# 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/eno1/operstate)"
ssid="$(wpa_cli status | grep -i ^ssid | sed -e 's/.*=//')"
state="$(wpa_cli status | grep -i ^wpa_state | sed -e 's/.*=//')"
[ "COMPLETED" = $state ] && str="$(printf " %s" $ssid)" || str="$(printf " ---")"
eth="$(cat /sys/class/net/enp0s31f6/operstate)"
if [ "up" = "$eth" ]; then
str="$(printf "%s /  " "$str")"
fi