]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Display todo list every hour.
authorSimon Ruderich <simon@ruderich.org>
Mon, 24 Nov 2008 19:15:03 +0000 (20:15 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 15:34:40 +0000 (16:34 +0100)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index b1cc9d551cb536342b5ab0b74cdb97e9fabf5943..93feb7d33f41383e2b8e64b64652e66ee7f6593e 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -102,6 +102,17 @@ TRAPINT() {
     return $1
 }
 
+# Execute all periodic functions every hour.
+PERIOD=3600
+# Display TODOs stored in ~/.todo if this file exists. Run every hour to make
+# clear they should be completed ;-).
+todo() {
+    if [[ -f ~/.todo ]]; then
+        cat ~/.todo | $PAGER
+    fi
+}
+add-zsh-hook periodic todo
+
 # Simplify calls to less, automatically redirects all output.
 alias -g L='2>&1 | less'
 # Simplify calls to colordiff, output is also piped through less.