#!/bin/sh
# pops up an editor with your TODO list for the day

# path to your TODO file
todo=$HOME/TODO
# your favorite x editor
xeditor=gvim

addtask() {
    tasklist="$tasklist$1
"
}

# default everyday tasks
# add or remove these as you see fit.
# these are numbered so that they appear in this order after sorting.
addtask "1. Take Vitamins"
addtask "2. Eat Breakfast"
addtask "3. Brush Teeth"

# get leftover tasks from yesterday
[ -f $todo ] && addtask "`cat $todo`"

echo "$tasklist" | \
sort | \
uniq | \
grep -v '^[ \t]*$' | \
cat > $todo


DISPLAY=:0.0 $xeditor $todo >& /dev/null

