dotfiles/_desktop/_scripts/sb-network

10 lines
321 B
Plaintext
Raw Normal View History

2022-07-30 01:02:25 +02:00
#!/bin/bash
icon='\uf1eb '
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) printf "<span background='#770000'>$icon no wifi</span>" ;;
2022-07-30 01:02:25 +02:00
up)
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "<span background='#770000'>$icon no ip</span>"
# && printf "$icon $(iwgetid -r)" \
2022-07-30 01:02:25 +02:00
esac