From da7abb9c1ada68b4c2c7c19c12b2d0424de79fe3 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 9 Feb 2021 17:04:55 -0500 Subject: updated i3blocks net for subnets via bastille --- i3blocks-net.sh | 6 +++--- 1 file 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 -- cgit v1.2.3