Showing a random quote from a file on the desktop
2014-07-31
  1. Put your quotes into a file and separate them with a blank line. Quotes can be multiline.

  2. Download NerdTool (http://mutablecode.com/apps/nerdtool.html)

  3. In NerdTool, add an entry for random quote and use the following command:

awk 'BEGIN{RS="";srand()}
{
quote[++c] = $0
}END{
RAND=int(rand()*c+1)
print quote[RAND]
}
' ~/quotes.txt
  1. Choose the refresh interval you want, configure the appearance and you’re good to go.