]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: Also display fortune every 4 hours.
authorSimon Ruderich <simon@ruderich.org>
Thu, 20 Dec 2012 16:38:40 +0000 (17:38 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 20 Dec 2012 16:55:54 +0000 (17:55 +0100)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index e2f7f9ccea2b86620aa9ffe62c8070ff5065f480..aa195f28b167da25b030ec5e20aef1cc1dfec0ad 100644 (file)
--- 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
 }