Showing a random quote from a file on the desktop
-
Put your quotes into a file and separate them with a blank line. Quotes can be multiline.
-
Download NerdTool (http://mutablecode.com/apps/nerdtool.html)
-
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
- Choose the refresh interval you want, configure the appearance and you’re good to go.