diff options
author | Adam T. Carpenter <atc@53hor.net> | 2021-02-09 17:04:55 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2021-02-09 17:04:55 -0500 |
commit | da7abb9c1ada68b4c2c7c19c12b2d0424de79fe3 (patch) | |
tree | e45eace8a6e60fae50ea1c723a2605bced5ac25d | |
parent | 0e33f0f1bc7803fd21d947f82d527c1edc71c316 (diff) | |
download | scripts-da7abb9c1ada68b4c2c7c19c12b2d0424de79fe3.tar.xz scripts-da7abb9c1ada68b4c2c7c19c12b2d0424de79fe3.zip |
updated i3blocks net for subnets via bastille
-rwxr-xr-x | i3blocks-net.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i3blocks-net.sh b/i3blocks-net.sh index 340a70a..d0a87a4 100755 --- a/i3blocks-net.sh +++ b/i3blocks-net.sh @@ -4,12 +4,12 @@ icon_down= icon_wireless= is_ethernet=$(ifconfig em0 | grep status | cut -d\: -f2) -inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3) +inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3 | tr '\n' ' ') if [ "$is_ethernet" = " active" ]; then - printf "%s%s" $icon_ethernet $inet + printf "%s%s" $icon_ethernet "$inet" elif [ "$(ifconfig wlan0 | grep status | cut -d\: -f2)" = " associated" ]; then ssid=$(ifconfig wlan0 | sed -n 's/^.*ssid \(.*\) channel.*$/\1/p') - [ -n "$ssid" ] && printf "%s%s %s" $icon_wireless "$ssid" $inet + [ -n "$ssid" ] && printf "%s%s %s" $icon_wireless "$ssid" "$inet" else printf "%sOffline" $icon_down fi |