The best kittens, technology, and video games blog in the world.

Tuesday, May 29, 2007

Using home directory as GTD inbox

fighting cats!!! by _Xti_ from flickr (CC-NC)
Here's a bit about my GTD system. It's mostly paper-based, with 85mm x 85mm paper cards, physical file folders and so on, but a lot of information comes in electronic form, and it needs to be managed.

So firstmost I have big directories for all kinds of information:

  • /home/taw/reference/* - electronic equivalent of the general reference system, with thing being in direct subdirectories, one "item" per directory
  • /home/taw/everything/ - checkout of svk (formerly svn) repository of all my software
  • A few directories like /home/taw/movies/* for The Colbert Report etc.
  • Everything else in the home directory or Desktop which is not a dotfile is "stuff" and needs to be processed.
There's a long way between knowing something needs to be processed and actually processing it in timely manner, so I want to be reminded about stuff I leave for too long. First I wrote a simple Ruby script that can be used to notify me about various events. It uses KDE DCOP service KNotify to actually display notifications.
header = "Notification"
msg = ARGV.join("\n")

system 'dcop', 'knotify', 'Notify', 'notify', 'notify',
header, msg, 'nosound', 'nofile', '16', '0'
And now the script which runs on detached screen or something like that to bug me about unprocessed things.
items_whitelist = %w[
/home/taw/Desktop
/home/taw/everything
/home/taw/ipoddb
/home/taw/music
/home/taw/movies
/home/taw/local
/home/taw/ebooks
/home/taw/img
/home/taw/website
/home/taw/website_snapshot
]

max_displayed = 10

big_timer = 5
old_items = []

while true
items = (Dir["/home/taw/*"] + Dir["/home/taw/Desktop/*"] - items_whitelist).sort
items = items.map{|x|x.sub(%r[\A/home/taw/],"* ")}.sort
next if items == []

if items == old_items
big_timer -= 1
sleep 60
next unless big_timer == 0
end
big_timer = 5

sz = items.size

if items.size > max_displayed
displayed_items = items.sort_by{rand}[0, max_displayed].sort + ["* ..."]
else
displayed_items = items
end
system "notify", "Inbox is not processed", "#{sz} items in your inbox:", *displayed_items

sleep 60
old_items = items
end
One more thing - I use Download Statusbar extension for Firefox and download everything to /home/taw/Desktop without asking any questions. That frees me from thinking about stuff I download - it's all going to the "home directory inbox".

No comments: