diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-07-01 20:08:17 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-07-01 20:08:17 +0100 |
commit | 1301a6667128ed8d5c583670c4a8afdcb8987fab (patch) | |
tree | 34c09a28e986d7c612f564355e46d35994a6b5e3 | |
parent | 70fa76bad046b30c86e52068217757dddb5a9b3b (diff) |
Updated dig lines
-rwxr-xr-x | .config/eww/scripts/network.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.config/eww/scripts/network.sh b/.config/eww/scripts/network.sh index cceebd7..e4f36fa 100755 --- a/.config/eww/scripts/network.sh +++ b/.config/eww/scripts/network.sh @@ -14,11 +14,11 @@ function ShowInfo { if [ "$(nmcli connection show --active | grep -oh "\w*ethernet\w*")" == "ethernet" ]; then - wan="$(dig +short myip.opendns.com @resolver1.opendns.com)" + wan="$(dig @resolver4.opendns.com myip.opendns.com +short)" connection="$(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' '): $(nmcli connection show --active | grep 'ethernet' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' ') | awk '{print $2}' FS='[:/]') WAN IP: $wan" elif [ "$(nmcli connection show --active | grep -oh "\w*wifi\w*")" == "wifi" ]; then - wan="$(dig +short myip.opendns.com @resolver1.opendns.com)" + 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" else |