mikelindner.com

powering the Internet since 1995

| Photography | Computing | Cooking |

Shell Fun II – The Geekening

December 2nd, 2019

Ok, now you have the best shell going, it’s time to add some bling.  None of these products really rely on zsh but while we’re tweaking the shell it’s a good time to cow things up 😉

 

cowsay

Everyone needs a message delivered via ascii art cow right?

sudo apt install cowsay

Hint: You can also use cowthink, just in case you want the cow to use it’s inside voice 😉

 

lolcat

Nothing to do with the memes, this is just “cat” but with extra lolz.  It’s a ruby jem, if you don’t know what that is please search for it.  I’m guessing most people reading my site do.

Basically lolcat outputs text in a rainbow.  In small doses it’s quite nice.

gem install lolcat

 

fortune

Every unix user over the age of 40 will definitely know fortune, but in case you haven’t heard about it, or forgotten what a simple pleasure it is, here’s a reminder

sudo apt install fortunes

fortune delivers a “fortune cookie” piece of wisdom, whether a quote, saying or even offensive joke, it’s up to you.  Currently on ubuntu 19.10 these packages are available by default, once you have the base package you can choose what suits you.

fortunes - Data files containing fortune cookies
fortune-mod - provides fortune cookies on demand
fortune-anarchism - anarchist quotes for fortune
fortunes-bofh-excuses - BOFH excuses for fortune
fortunes-debian-hints - Debian Hints for fortune
fortunes-mario - Fortunes files from Mario
fortunes-min - Data files containing selected fortune cookies
fortunes-off - containing offensive fortune cookies
fortunes-spam - fortunes taken from SPAM messages

Pick and choose whatever you like.

More can be found here:
https://www.splitbrain.org/projects/fortunes

Putting it all together

Now you have this collection of useless(?) amusements simply add the following to the end of your .zshrc and everytime you call a shell you’ll get a colourful cow telling you something interesting!

 
you should put these lines in the end of your .zshrc (also works in .bashrc):

PROMPT="$fg[cyan]%}$USER@%{$fg[blue]%}%m ${PROMPT}"
fortune | cowsay | lolcat
hostname | figlet | lolcat

Fun!