mirror of
https://github.com/alrayyes/i3blocks
synced 2023-11-13 18:16:40 +00:00
12 lines
186 B
Plaintext
12 lines
186 B
Plaintext
|
#!/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
|