dotfiles/_desktop/_scripts/sb-network

9 lines
325 B
Bash
Executable file

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