From: Simon Ruderich Date: Thu, 20 Dec 2012 16:38:40 +0000 (+0100) Subject: zsh/rc: Also display fortune every 4 hours. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=9b4edaeb7c8a573fcf2c865fe1dd7c16337e0c76;p=config%2Fdotfiles.git zsh/rc: Also display fortune every 4 hours. --- diff --git a/zsh/rc b/zsh/rc index e2f7f9c..aa195f2 100644 --- a/zsh/rc +++ b/zsh/rc @@ -773,9 +773,12 @@ exec 2>>(while read -r -k -u 0 line; do print -n $'\0'; done &) -# Run reminder and redisplay it every four hours (if it's available). +# Run the following programs every 4 hours. PERIOD=14400 periodic() { + # Display fortunes. + (( $+commands[fortune] )) && fortune -ac + # Display reminders. (( $+commands[rem] )) && [ -f ~/.reminders ] && rem -h }