It’s been a few weeks since I last visited Lifehacker, but I’m glad that I did so today. The article title Roll Your Own Lightning at Sunset Desktop, with its associated picture, grabbed my attention as I had been trying to write something to simulate arcing electricity for a video effect not so long ago. It didn’t help any with that venture, but it did get me to see the power and usefulness of the combination of Launchy and Samurize, or Conky for the Tux fans.
As I read more, I found another post, Take Launchy beyond application launching, that demonstrated how to add items to the desktop to-do list with Launchy. All very well, I thought, but what about when the task is actually done; I wanted an equally simple way to remove specific items too. So I created these two Python scripts: todo; and done. They reside in Launchy’s Utilities folder for organisation’s sake, though they can go anywhere that is scanned for *.py files.
Todo adds text as a numbered line to the to-do list, activated by:
Launchy:
todo <TAB> Text to add to the list.
Done removes specific items by number (which is why todo numbers them), and can delete multiple lines if the numbers are separated by spaces, for example:
Launchy:
done <TAB> 2 5
deletes the second and fifth items. (Numbers need not be in any particular order.)

Items are renumbered automagically as the list is updated.

The two scripts default to a to-do list location of C:\todo.txt, but this is easily changed by setting the todo_list variable to something else. Note that this file should already exist, and either be empty or a correctly formatted list to begin with, since I didn’t see the value in making either script check for its existence/formatting every time it’s run.
Obviously Python is needed for these scripts to run, but if you don’t have it already, why not? Seriously. Why? Windows users can use ActivePython; Linux Launchyers should be just fine already.
todo.py and done.py are released under a GPLv3 licence.

Hey, great script! I just spent the past couple hours this morning trying to get launchy, cygwin, and todo.txt working right with samurize, but this is a much better solution. Thanks for the python scripts!
JonMonday, 17th November 2008 15:26:20
Thank you so much for making these scripts. I too had been trying to find a simpler solution to todo.txt, launchy, and samurize. This is perfect.
HeatherTuesday, 17th March 2009 17:18:09
Hey! I have a problem with your script!
It makes two spaces before the entries in the todo-list, and I don’t want that. I’ve tried to remove the rjust(3) parameter, but then done.py fails to remove the lines, and instead just removes two characters from each line.
Please help :)
RickiMonday, 27th April 2009 09:43:10