sb-network was unable to show full name of wifi networks containing spaces

This commit is contained in:
Bartek Stalewski 2021-12-01 19:34:10 +01:00
parent 95e8bb3b3a
commit 26183fcb7e

View File

@ -4,6 +4,6 @@ case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) printf "^c#161616^^b#fd4285^\ue63e no wifi^d^" ;; down) printf "^c#161616^^b#fd4285^\ue63e no wifi^d^" ;;
up) up)
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] \ [ -n "$(ip address show dev wlan0 | grep 'inet ')" ] \
&& printf "\ue63e $(iw dev wlan0 info | awk '/ssid/ {print $2}')" \ && printf "\ue63e $(iw dev wlan0 info | grep 'ssid ' | cut -d' ' -f2-)" \
|| printf "^c#161616^^b#fd4285^\ue63e no ip^d^" ;; || printf "^c#161616^^b#fd4285^\ue63e no ip^d^" ;;
esac esac