clean up scripts
This commit is contained in:
12
.config/polybar/scripts/network-ipinfo.io.sh
Normal file
12
.config/polybar/scripts/network-ipinfo.io.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
ipinfo=$(curl -sf "https://ipinfo.io/json")
|
||||
|
||||
if [ -n "$ipinfo" ]; then
|
||||
ipinfo_ip=$(echo "$ipinfo" | jq -r '.ip')
|
||||
ipinfo_country=$(echo "$ipinfo" | jq -r '.country')
|
||||
|
||||
echo "# $ipinfo_ip [ $ipinfo_country ]"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user