diff --git a/systempony b/systempony index b435471..cc116de 100755 --- a/systempony +++ b/systempony @@ -4,7 +4,7 @@ # Name of the pony PONY=random # What info to show (must have a function defined as ponyget_* to work) -INFO=(User Hostname Distro Kernel Uptime Load Shell Packages RAM Swap Disk) +INFO=(User Hostname IP Distro Kernel Uptime Load Shell Packages RAM Swap Disk) # File system type to show disk usage (default/empty=all) (see df for specific values) FSTYPE= @@ -135,6 +135,11 @@ function ponyget_Containers() echo -e "\x1b[$color;1m$active\x1b[0m / $total active" } +function ponyget_IP() +{ + ip -o addr | grep -vE "lo\s+inet" | grep -Po "inet6?\s*\K[^/]+" | xargs echo +} + function bold() { echo -en "\x1b[1m${*}\x1b[22m"