But not too short.

This commit is contained in:
Bartek Stalewski 2022-04-14 15:33:56 +02:00
parent a276c195cb
commit a8f0cdaf6a
3 changed files with 4 additions and 3 deletions

View file

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