aboutsummaryrefslogtreecommitdiff
path: root/bin/wlan
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wlan')
-rwxr-xr-xbin/wlan5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/wlan b/bin/wlan
index fcd35e4..14d0813 100755
--- a/bin/wlan
+++ b/bin/wlan
@@ -2,9 +2,10 @@
# prints connected SSID name
wlan() {
- wlan="$(iwgetid | awk ' {print $2, $3, $4, $5, $6} ' | sed -e 's/ESSID://g' -e 's/"//g')"
+ station="$(iwctl device list | grep station | awk ' { print $1 } ')"
+ essid="$(iwgetid | sed -e 's/ESSID://g' -e 's/"//g' -e "s:$station::g" -e 's/^\W*/ /g')"
- printf "%s %s" "" "$wlan"
+ printf "%s" "$essid"
}
wlan