You are not logged in.

#1 2012-01-09 11:03:19

markoer
Member
Registered: 2010-12-15
Posts: 57

simple ToDo list for conky

i use it for quite some time with conky  to list my tasks, it is very simple

#!/bin/bash

FILE="/home/$USER/Documents/todo.txt"

case $1 in
	--add | -a) 
	echo " -$@" >> ~/.todo.tmp 
	sed -i s/--add//g ~/.todo.tmp
	cp ~/.todo.tmp $FILE
	;;
	--clear)
	echo > $FILE
	echo > ~/.todo.tmp 
 	;;
	--delete | -d )
	sed '/'"$2"'/d' $FILE > ~/.todo.tmp
	cp ~/.todo.tmp $FILE
	;;
	--show | -s)
	cat $FILE
	;;
	--help | -h)
    echo -e "usage: todo [ -a |--add ] [ --clear ] [-d |--delete]  [ -s | --show] [-h |--help]"
    ;;
    *)
    echo -e "Wrong!Type --help for help."    
esac	 		
exit 0

Offline

Board footer

Powered by FluxBB