scripts

scripts to make my pc work
Index Commits Files Refs
statusbar/sb-iplocate (412B)
   1 #!/bin/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 
   8 ifinstalled "geoip" || exit
   9 addr="$(curl ifconfig.me 2>/dev/null)" || exit
  10 grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//"