8 lines
294 B
Bash
Executable file
8 lines
294 B
Bash
Executable file
#!/bin/bash
|
|
|
|
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
|
down) printf "<span background='#770000'>no wifi</span>" ;;
|
|
up)
|
|
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "<span background='#770000'>no ip</span>"
|
|
# && printf "$icon $(iwgetid -r)" \
|
|
esac
|