mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
14 lines
467 B
Plaintext
Executable File
14 lines
467 B
Plaintext
Executable File
#/bin/bash
|
|
|
|
# Gets your public ip address checks which country you are in and
|
|
# displays that information in the statusbar
|
|
#
|
|
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
|
|
# To get the flag-emojis file:
|
|
#
|
|
# curl https://samerickson.me/files/flag-emojis > ~/.local/share/flag-emojis
|
|
#
|
|
addr="$(curl ifconfig.me 2>/dev/null)"
|
|
country="$(geoiplookup $addr | awk '{print $5}')"
|
|
printf "%s" "$(sed -n /$country/p ~/.local/share/larbs/flag-emojis)"
|