blob: 4eb2f9527ced5ab36c79904cd94272119e119555 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
#!/bin/sh
# https://sinanmohd.com
current_ip=$(dig +short myip.opendns.com @208.67.222.222)
geo_loc_ip=$(geoiplookup "$current_ip" | grep -v "Country" | sed 's/^.*: //g')
command -v "notify-send" 1>/dev/null &&
notify-send " $current_ip" "$geo_loc_ip"
printf "ipv4: %s\n%s\n" "$current_ip" "$geo_loc_ip"
|