1
0
Fork 0
env/.local/bin/big-addr

12 lines
210 B
Bash
Executable File

#!/bin/bash
ip=""
if [[ "$(uname -s)" == "Darwin" ]]; then
ip="$(ipconfig getifaddr en0)"
else
ip="$(ip route get 1 | head -n 1 | sed -e 's/.*src \([^ ]*\) .*/\1/')"
fi
toilet -f mono9 -w $(tput cols) $ip