aboutsummaryrefslogtreecommitdiff
path: root/config/i3blocks/scripts/wifi
diff options
context:
space:
mode:
Diffstat (limited to 'config/i3blocks/scripts/wifi')
-rwxr-xr-xconfig/i3blocks/scripts/wifi4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/i3blocks/scripts/wifi b/config/i3blocks/scripts/wifi
index a8af5e4..d549b10 100755
--- a/config/i3blocks/scripts/wifi
+++ b/config/i3blocks/scripts/wifi
@@ -16,7 +16,7 @@
#------------------------------------------------------------------------
-INTERFACE="${BLOCK_INSTANCE:-wlan0}"
+INTERFACE="$(ip link | awk '/wlp.*/ {print substr($2, 1, length($2)-1); exit}')"
#------------------------------------------------------------------------
@@ -32,7 +32,7 @@ SSID=$(iwgetid $INTERFACE | sed 's/.*ESSID:"\([^"]*\)"/\1/')
#------------------------------------------------------------------------
-echo $SSID: $QUALITY% # full text
+echo $SSID $QUALITY% # full text
echo $SSID # short text
# color