dotfiles/_desktop/_scripts/sb-network

7 lines
184 B
Plaintext
Raw Normal View History

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