Show IP addresses

This commit is contained in:
Mattia Basaglia 2016-05-18 22:04:22 +01:00
parent d1f3e33715
commit b87969a264

View file

@ -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"