From ea580a3385755871b4e87612da0ce96ba002601a Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 25 Jan 2022 18:46:05 +0100 Subject: [PATCH] config/neofetch: raise weather timeout and add ip --- .config/neofetch/config-short.conf | 3 ++- .config/neofetch/config.conf | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/neofetch/config-short.conf b/.config/neofetch/config-short.conf index 78f9cb8..809683a 100644 --- a/.config/neofetch/config-short.conf +++ b/.config/neofetch/config-short.conf @@ -9,7 +9,8 @@ print_info() { info "Host" model info "Uptime" uptime info "Memory" memory - prin "Weather" "$(timeout .4s curl --max-time 0.2 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)" + prin "Weather" "$(timeout 1s curl --max-time 0.3 'wttr.in/?0?q?T' | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)" + prin "IP" "$(curl ifconfig.me && printf " / " && curl icanhazip.com)" } diff --git a/.config/neofetch/config.conf b/.config/neofetch/config.conf index 5a8e242..aac7abd 100644 --- a/.config/neofetch/config.conf +++ b/.config/neofetch/config.conf @@ -37,7 +37,9 @@ print_info() { # info "Install Date" install_date # info "Locale" locale # This only works on glibc systems. - prin "Weather" "$(curl wttr.in/?0?q?T -m 0.1 | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)" + prin "Weather" "$(curl wttr.in/?0?q?T -m 0.3 | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}' || echo Timeout)" + prin "IP" "$(curl ifconfig.me)" + prin "IPv6" "$(curl icanhazip.com)" info line_break info cols