Skip to content

Instantly share code, notes, and snippets.

@Coornail
Last active December 13, 2015 22:29
Show Gist options
  • Save Coornail/4985036 to your computer and use it in GitHub Desktop.
Save Coornail/4985036 to your computer and use it in GitHub Desktop.
Todo.txt helper which lists Pronovix todos on weekdays from 9-6 and anything else other times.
#!/bin/sh
HOUR=`date +%H | sed -e 's/^0//g'`
DAY=`date +%A`
# Don't list work related tasks...
FILTER='-+Pronovix'
# ... Except at work time.
if [[ $HOUR -gt 8 && $HOUR -lt 18 ]]; then
FILTER='+Pronovix'
fi
# I don't work on weekends.
if [[ "$DAY" == "Saturday" ]]; then
FILTER='-+Pronovix'
fi
if [[ "$DAY" == "Sunday" ]]; then
FILTER='-+Pronovix'
fi
~/shellscript/todo.sh -d ~/.todo/todo.cfg list $FILTER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment