From d7411594c0ca071f08da108f544902f03e2e413d Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Fri, 9 Oct 2020 09:50:40 -0400 Subject: fixed uptime and network scripts, added transcode-screencast --- i3blocks-net.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i3blocks-net.sh') diff --git a/i3blocks-net.sh b/i3blocks-net.sh index 396faa6..26aad7b 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) if [ "$is_ethernet" = " active" ]; then - inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3) - printf "%s%s\n" $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" $icon_wireless "$ssid" + [ -n "$ssid" ] && printf "%s%s %s" $icon_wireless "$ssid" $inet else printf "%sNo connection" $icon_down fi -- cgit v1.2.3