1
0
mirror of https://github.com/alrayyes/i3blocks synced 2023-11-13 18:16:40 +00:00
i3blocks/whatismyip

12 lines
186 B
Plaintext
Raw Permalink Normal View History

2016-11-21 20:57:28 +00:00
#!/bin/sh
ip=$(curl -s icanhazip.com);
if [[ "$BLOCK_BUTTON" -eq 1 ]];
then
netname=$(whois $ip | grep '^netname:' | awk '{print $2}' | tail -1);
echo "$netname"
else
echo "$ip"
fi