From a02ba4bc8321ab9ccfcd0bb52ef5d344d4a92fa4 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 28 Jun 2024 22:30:47 +0300 Subject: [PATCH] config/neofetch: properly get ip adresses --- .config/neofetch/config-server.conf | 2 +- .config/neofetch/config-short.conf | 2 +- .config/neofetch/config.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/neofetch/config-server.conf b/.config/neofetch/config-server.conf index cd82830..d76562a 100644 --- a/.config/neofetch/config-server.conf +++ b/.config/neofetch/config-server.conf @@ -9,7 +9,7 @@ print_info() { info "Host" model info "Uptime" uptime info "Memory" memory - prin "IP" "$(timeout .4s ( curl --max-time 0.3 ifconfig.me && printf " / " && curl icanhazip.com ) )" + prin "IP" "$(timeout .4s ( curl -4 --max-time 0.3 ifconfig.me && printf " / " && curl -6 --max-time 0.3 ifconfig.me ) )" } diff --git a/.config/neofetch/config-short.conf b/.config/neofetch/config-short.conf index c9c3c2d..98fba49 100644 --- a/.config/neofetch/config-short.conf +++ b/.config/neofetch/config-short.conf @@ -9,7 +9,7 @@ print_info() { info "Host" model info "Memory" memory prin "Weather" "$(timeout .4s curl --max-time 1 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)" - prin "IP" "$(timeout .4s ( curl --max-time 0.3 ifconfig.me && printf " / " && curl icanhazip.com ) )" + prin "IP" "$(timeout .4s ( curl -4 --max-time 0.3 ifconfig.me && printf " / " && curl -6 --max-time 0.3 ifconfig.me ) )" } diff --git a/.config/neofetch/config.conf b/.config/neofetch/config.conf index 7a1957e..70e3533 100644 --- a/.config/neofetch/config.conf +++ b/.config/neofetch/config.conf @@ -36,7 +36,7 @@ print_info() { #prin "IP" "$(curl ifconfig.me)" info "Public IP" public_ip - prin "IPv6" "$(curl icanhazip.com)" + prin "IPv6" "$(curl -6 --max-time 0.3 ifconfig.me)" prin "Weather" "$(timeout .6s curl --max-time 1 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)"