1
0
Fork 0
dotfiles/.local/bin/statusbar/sb-iplocate
Luca Bilke 0555146aed various changes
various changes
2022-08-22 20:33:58 +02:00

5 lines
298 B
Bash
Executable file

#!/bin/sh
# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/
ifinstalled "geoip" || exit
addr="$(curl snaile.de/ip 2>/dev/null)" || exit
grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"