diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-04-23 10:43:57 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-04-23 10:43:57 -0400 |
| commit | 47b955673d66f266e7c091a4f9d9bcb45c002a5f (patch) | |
| tree | 631b6e4d9872d1e87bd33f4b876cc5aa928cb606 /.scripts | |
| parent | 9eceb54bfd05e212411e3897bb4b5caff1a991e9 (diff) | |
| parent | fbe14a9a068350309453994341cee59bacc5faea (diff) | |
| download | eibhear-47b955673d66f266e7c091a4f9d9bcb45c002a5f.tar.gz eibhear-47b955673d66f266e7c091a4f9d9bcb45c002a5f.tar.zst eibhear-47b955673d66f266e7c091a4f9d9bcb45c002a5f.zip | |
iplocate module added
Diffstat (limited to '.scripts')
| -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/;.*//" |
