dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 47b955673d66f266e7c091a4f9d9bcb45c002a5f
parent 9eceb54bfd05e212411e3897bb4b5caff1a991e9
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Tue, 23 Apr 2019 10:43:57 -0400

iplocate module added

Diffstat:
M.config/i3blocks/config | 3+++
A.scripts/statusbar/iplocate | 9+++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/.config/i3blocks/config b/.config/i3blocks/config @@ -17,6 +17,9 @@ label=📰 interval=once signal=6 +#[iplocate] +#interval=30 + [pacpackages] label=📦 interval=once diff --git a/.scripts/statusbar/iplocate 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/;.*//"