More minimal statusbar - I don't need the wifi network info when connected.

This commit is contained in:
Bartek Stalewski 2022-08-31 00:08:55 +02:00
parent 067c7cb8d9
commit 548d3793e2

View file

@ -2,9 +2,8 @@
icon='\uf1eb ' icon='\uf1eb '
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) printf "$icon <span background='#770000'>no wifi</span>" ;; down) printf "<span background='#770000'>$icon no wifi</span>" ;;
up) up)
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] \ [ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "<span background='#770000'>$icon no ip</span>"
&& printf "$icon $(iwgetid -r)" \ # && printf "$icon $(iwgetid -r)" \
|| printf "$icon <span background='#770000'>no ip</span>"
esac esac