config/neofetch: properly get ip adresses
This commit is contained in:
parent
83c67d2cb1
commit
a02ba4bc83
|
@ -9,7 +9,7 @@ print_info() {
|
||||||
info "Host" model
|
info "Host" model
|
||||||
info "Uptime" uptime
|
info "Uptime" uptime
|
||||||
info "Memory" memory
|
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 ) )"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ print_info() {
|
||||||
info "Host" model
|
info "Host" model
|
||||||
info "Memory" memory
|
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 "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 ) )"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ print_info() {
|
||||||
|
|
||||||
#prin "IP" "$(curl ifconfig.me)"
|
#prin "IP" "$(curl ifconfig.me)"
|
||||||
info "Public IP" public_ip
|
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)"
|
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)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue