Created
January 10, 2019 11:07
-
-
Save cariandrum22/6e9b9ac2337dc55f975bc43ad748c028 to your computer and use it in GitHub Desktop.
Message of the day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_greeting -d "what's up, fish?" | |
status --is-login | |
if [ $status = 0 ] | |
if which figlet > /dev/null | |
figlet "Jehoshaphat!" | |
echo "" | |
end | |
echo "Name: "(hostname) | |
echo "Uptime: "(thunnus.os.uptime) | |
echo "" | |
echo "CPU: "(thunnus.os.cpu) | |
echo "Memory: "(thunnus.os.memory.total) | |
echo "Swap: "(thunnus.os.swap.total) | |
echo "Disk: "(df -h / | tail -n1 | awk '{ print $2 }') | |
echo "Distro: "(thunnus.os.distro) | |
echo "" | |
echo "CPU Load: "(thunnus.os.load_average) | |
echo "Free Memory: "(thunnus.os.memory.free) | |
echo "Free Swap: "(thunnus.os.swap.free) | |
echo "Free Disk: "(df -h / | tail -n1 | awk '{ print $3 }') | |
echo "" | |
echo "Public Address: "(curl -s inet-ip.info/) | |
# TODO: Solve the problem that the interface name changes for each environment. | |
echo "Private Address: "(ifconfig en0 | grep inet | awk '{print $2}' | tail -n1) | |
if which fortune cowsay > /dev/null | |
echo "" | |
fortune | cowsay -f (cowsay -l | tail -n +2 | tr ' ' '\n' | gshuf -n1) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script depends on https://github.com/cariandrum22/thunnus