setup-cockpit/dotfiles/i3/scripts/pub-ip

13 lines
239 B
Bash
Executable file

#!/bin/bash
CYAN="<span foreground='#8ccaff'>"
GREEN="<span foreground='#8cff8a'>"
NC="</span>"
ip="$(curl ifconfig.me)"
if ip link show tun0 >/dev/null 2>&1; then
echo "${GREEN}VPN:${NC} $ip"
else
echo "${CYAN}IP:${NC} $ip"
fi