I just wrote a little script which combines the KDE tool kdialog with the newTodo.rb script.
When I’m in the middle of something, and I suddenly realise there a task to be done, I just press a hotkey, enter the task, and continue with what I was doing, the task now safely recorded in my Tracks system.
You can get the newTodo.rb script here: http://www.rousette.org.uk/projects/downloads/comments/ruby-command-line-api-script/
Be sure to have properly preconfigured the newTodo.rb script, just open it up with a text editor.
My script is only one line (I’m assuming newTodo.rb can be found in the ~/bin folder in your homedir):
~/bin/newTodo.rb "`kdialog --inputbox "Enter task here"`"
Add this to your KDE menu (just paste it in the command box), or stick it in a text file and make it executable. If you’ve used the KDE menu, you can also assign a hotkey to this command, like WIN+T.
Then all that’s left to do is to press the hotkey, and enter the task. It will then show up in the context you have specified in newTodo.rb.
I personally have made an “Inbox” context for this purpose, because the task still needs to be moved to a proper context, given a better descript and a deadline, etc. newTodo.rb can only add to one context. Or you could define more entries in your menu and assign more hotkeys, one for each context. The newTodo.rb script will accept a context argument like so:
~/bin/newTodo.rb -c 14 "`kdialog --inputbox "Enter task here"`"
The -c 14 bit will put the task in context number 14, no matter the preconfigured setting in newTodo.rb.
Note it doesn’t check if you’ve entered more than 100 chars, anything which exceeds it will be cut off.
Obviously, my script is pretty basic, but it could be expanded to first ask about a context, which could then be converted to the appropriate context id. Since I’m not much of a bash programmer, that’s unlikely to happen, but the current script alone I find tremendously useful so I can record tasks quickly with minimum effort.
