summaryrefslogtreecommitdiff
path: root/i3blocks-net.sh
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-09-06 08:26:26 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-09-06 08:26:26 -0400
commit8633c82378ab9b3a88b956def1a05cb76b4c11fd (patch)
tree94cefff77aa6f681d5ceba4bd64013965a2ec468 /i3blocks-net.sh
parentc8856a355b777156ccad4fd1f01d32e10684b0b4 (diff)
downloadscripts-8633c82378ab9b3a88b956def1a05cb76b4c11fd.tar.xz
scripts-8633c82378ab9b3a88b956def1a05cb76b4c11fd.zip
added freebsd US FTP mirror ranker
Diffstat (limited to 'i3blocks-net.sh')
-rwxr-xr-xi3blocks-net.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/i3blocks-net.sh b/i3blocks-net.sh
index abb241f..396faa6 100755
--- a/i3blocks-net.sh
+++ b/i3blocks-net.sh
@@ -8,8 +8,8 @@ if [ "$is_ethernet" = " active" ]; then
inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3)
printf "%s%s\n" $icon_ethernet $inet
elif [ "$(ifconfig wlan0 | grep status | cut -d\: -f2)" = " associated" ]; then
- ssid=$(ifconfig wlan0 | grep ssid\ | cut -d'"' -f2)
- [ -n "$ssid" ] && printf "%s\"%s\"" $icon_wireless "$ssid"
+ ssid=$(ifconfig wlan0 | sed -n 's/^.*ssid \(.*\) channel.*$/\1/p')
+ [ -n "$ssid" ] && printf "%s%s" $icon_wireless "$ssid"
else
printf "%sNo connection" $icon_down
fi