diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-04-23 10:43:23 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-04-23 10:43:23 -0400 |
| commit | 56d418e5259eee850f2afa10d8dd4260e6d42683 (patch) | |
| tree | 8909e08e02254594bc82afd283e50b8da9aba712 | |
| parent | b38c14f2e784d0faca926d2c1bbe0c0ae0a6c702 (diff) | |
| download | eibhear-56d418e5259eee850f2afa10d8dd4260e6d42683.tar.gz eibhear-56d418e5259eee850f2afa10d8dd4260e6d42683.tar.zst eibhear-56d418e5259eee850f2afa10d8dd4260e6d42683.zip | |
avoid conflict with `locate`
| -rwxr-xr-x | .scripts/statusbar/iplocate | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/.scripts/statusbar/iplocate b/.scripts/statusbar/iplocate new file mode 100755 index 0000000..4ca4f10 --- /dev/null +++ b/.scripts/statusbar/iplocate @@ -0,0 +1,9 @@ +#!/bin/sh + +# 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/ +ifinstalled "geoiplookup" || exit +addr="$(curl ifconfig.me 2>/dev/null)" || exit +grep "flag: " ~/.config/emoji | grep "$(geoiplookup $addr | sed 's/.*, //')" | sed "s/flag: //;s/;.*//" |
