From 680a167d6f72853eeab01970426028fc474c6005 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Thu, 14 May 2020 17:35:21 -0400 Subject: added net, updated audio for FreeBSD, removed title blocks --- i3blocks-net.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 i3blocks-net.sh (limited to 'i3blocks-net.sh') diff --git a/i3blocks-net.sh b/i3blocks-net.sh new file mode 100755 index 0000000..8690cb9 --- /dev/null +++ b/i3blocks-net.sh @@ -0,0 +1,12 @@ +#!/bin/sh +icon_ethernet=󰈁 +icon_wireless=󰖩 + +is_ethernet=$(ifconfig em0 | grep status | cut -d':' -f2) +if [ "$is_ethernet" = " active" ]; then + inet=$(ifconfig lagg0 | grep inet\ | cut -w -f3) + printf "$icon_ethernet %s\n" $inet +else + ssid=$(ifconfig wlan0 | grep ssid | cut -d'"' -f2) + printf "$icon_wireless %s\n" "$ssid" +fi -- cgit v1.2.3