From cf6d409c41a4f7fd234afb76c625bd6b9eb0abc6 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Sat, 3 Aug 2024 10:09:59 +0100 Subject: Fixed formatting of network status information in notification --- .config/eww/scripts/network.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.config/eww') diff --git a/.config/eww/scripts/network.sh b/.config/eww/scripts/network.sh index a554919..29396aa 100755 --- a/.config/eww/scripts/network.sh +++ b/.config/eww/scripts/network.sh @@ -18,8 +18,7 @@ function ShowInfo { connection="$(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' '): $(nmcli connection show --active | grep 'ethernet' | awk '{ printf "%s\nLAN IP:",$1 }' FS=' ') $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' ') | awk '{printf "%s\nWAN IP: '$wan'", $2}' FS='[:/]')" elif [ "$(nmcli connection show --active | grep -oh "\w*wifi\w*")" == "wifi" ]; then wan="$(dig @resolver4.opendns.com myip.opendns.com +short)" - connection="$(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' '): $(nmcli connection show --active | grep 'wifi' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' ') | awk '{print $2}' FS='[:/]') -WAN IP: $wan" + connection="$(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' '): $(nmcli connection show --active | grep 'wifi' | awk '{ printf "%s\nLAN IP:",$1 }' FS=' ') $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' ') | awk '{printf "%s/nWAN IP: '$wan'", $2}' FS='[:/]')" else connection="No active connection." fi -- cgit v1.2.3