From b38c14f2e784d0faca926d2c1bbe0c0ae0a6c702 Mon Sep 17 00:00:00 2001 From: Sam Erickson Date: Thu, 4 Apr 2019 22:31:32 -0700 Subject: [PATCH 1/3] Added country indicatior as a status bar option --- .config/i3blocks/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/i3blocks/config b/.config/i3blocks/config index e984724..c255f46 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -17,6 +17,9 @@ label=📰 interval=once signal=6 +[locate] +interval=30 + [pacpackages] label=📦 interval=once From 56d418e5259eee850f2afa10d8dd4260e6d42683 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 23 Apr 2019 10:43:23 -0400 Subject: [PATCH 2/3] avoid conflict with `locate` --- .scripts/statusbar/iplocate | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .scripts/statusbar/iplocate 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/;.*//" From fbe14a9a068350309453994341cee59bacc5faea Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 23 Apr 2019 10:43:36 -0400 Subject: [PATCH 3/3] iplocate not default --- .config/i3blocks/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/i3blocks/config b/.config/i3blocks/config index c255f46..06edb86 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -17,8 +17,8 @@ label=📰 interval=once signal=6 -[locate] -interval=30 +#[iplocate] +#interval=30 [pacpackages] label=📦