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

12 lines
186 B
Bash
Executable File

#!/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