iplocate module added
This commit is contained in:
commit
47b955673d
2 changed files with 12 additions and 0 deletions
|
@ -17,6 +17,9 @@ label=📰
|
|||
interval=once
|
||||
signal=6
|
||||
|
||||
#[iplocate]
|
||||
#interval=30
|
||||
|
||||
[pacpackages]
|
||||
label=📦
|
||||
interval=once
|
||||
|
|
9
.scripts/statusbar/iplocate
Executable file
9
.scripts/statusbar/iplocate
Executable file
|
@ -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/;.*//"
|
Loading…
Reference in a new issue