config/neofetch: raise weather timeout and add ip

This commit is contained in:
xeruf 2022-01-25 18:46:05 +01:00
parent a5250eca33
commit ea580a3385
2 changed files with 5 additions and 2 deletions

View File

@ -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)"
}

View File

@ -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