summaryrefslogtreecommitdiff
path: root/i3blocks-net.sh
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-09 09:50:40 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-09 09:50:40 -0400
commitd7411594c0ca071f08da108f544902f03e2e413d (patch)
tree6d9d95e837f22112c0fe251f7898c2520847cbf3 /i3blocks-net.sh
parentf015761d39ac3f0b191d804e2ce05300a4aaf500 (diff)
downloadscripts-d7411594c0ca071f08da108f544902f03e2e413d.tar.xz
scripts-d7411594c0ca071f08da108f544902f03e2e413d.zip
fixed uptime and network scripts, added transcode-screencast
Diffstat (limited to 'i3blocks-net.sh')
-rwxr-xr-xi3blocks-net.sh6
1 files changed, 3 insertions, 3 deletions
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