repos/scripts

Simple scripts that I made for my personal computer to map keys, make bluetooth work, brightness keys, etc.
Commits Files Refs README LICENSE
statusbar/sb-iplocate (10 lines)
   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/;.*//"