dotfiles/_suckless/_scripts/sb-network

11 lines
357 B
Plaintext
Raw Normal View History

2021-07-26 16:52:58 +02:00
#!/bin/bash
2021-06-19 15:50:04 +02:00
# Show wifi 📶 and percent strength or 📡 if none.
# Show 🌐 if connected to ethernet or ❎ if none.
# Show 🔒 if a vpn connection is active
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
2021-07-26 16:52:58 +02:00
down) printf "^c#161616^^b#fd4285^\ue63e no wifi^d^" ;;
up) printf "\ue63e $(iw dev wlp3s0 info | awk '/ssid/ {print $2}')" ;;
2021-06-19 15:50:04 +02:00
esac