iplocate (388B)
1 #!/usr/bin/env sh 2 3 # Gets your public ip address checks which country you are in and 4 # displays that information in the statusbar 5 # 6 # https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/ 7 ifinstalled "geoiplookup" || exit 8 addr="$(curl ifconfig.me 2>/dev/null)" || exit 9 grep "flag: " ~/.config/emoji | grep "$(geoiplookup $addr | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"