fix(polybar): harden public ip lookup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user