fix(polybar): harden public ip lookup

This commit is contained in:
2026-07-21 15:17:07 +02:00
parent e7c33b6411
commit 47ffa48678
+1 -1
View File
@@ -12,7 +12,7 @@
[module/public_ip]
type = custom/text
content=
click-left = curl -s ifconfig.co | while read OUTPUT; do notify-send "$OUTPUT"; done & curl -s ifconfig.co | xargs -I % sh -c "curl -s ipinfo.io/%/city" | while read OUTPUT; do notify-send "$OUTPUT"; done
click-left = ip="$(curl -fsS --connect-timeout 3 --max-time 5 https://ifconfig.co/ip)" || exit; case "$ip" in ''|*[!0-9A-Fa-f.:]*) exit 1 ;; esac; notify-send "$ip"; city="$(curl -fsS --connect-timeout 3 --max-time 5 "https://ipinfo.io/${ip}/city")" || exit; notify-send "$city"
[module/mic_status]
type = custom/script