Last active
December 13, 2015 22:29
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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