Add iface script

This commit is contained in:
Riyyi
2020-07-14 14:23:43 +02:00
parent 99f13642c1
commit 8d864e5207
4 changed files with 15 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
WIRELESS="${1:-wlan0}"
SSID="$(iw dev "$WIRELESS" link | awk '/SSID/ { print $2 }')"
IP="$(ip a show "$WIRELESS" \
| awk '/inet / { print substr($2, 0, length($2) - 3) }')"
notify-send -r 3 "Wifi" "\
Interface: $WIRELESS
SSID: $SSID
IP: $IP"