commit c919b93901264d21f7bb7b6f4f3f8581e28cf640
parent 14c1c276a612662dca2caeb25a4e9cdf4825f5c1
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 27 Dec 2018 11:24:46 +0100
Fix internet widget with docker
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/links/.config/i3/i3scripts/i3internet b/links/.config/i3/i3scripts/i3internet
@@ -16,9 +16,8 @@ esac
if [ ! -n "${wifiicon+var}" ]; then
wifiicon=$(grep "^\s*w" /proc/net/wireless | \
awk '{ print "📶", int($3 * 100 / 70) "% " }')
- ssid=$(nmcli connection show | head -n 2 | tail -n 1 | awk '{print $1}')
+ ssid=$(nmcli connection show | grep 'wifi' | head -n 1 | awk '{print $1}')
wifiicon="$wifiicon($ssid) "
fi
-
printf "%s%s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"