Working with open source is fun because it lets me explore software and change little things. If you’re not really into code and config files, you might want to skip this post 🙂

Zim task list (default)
Since some time I use Zim, a desktop wiki, to take notes in meetings and at conferences. It shares a few good things with Tomboy, the default notebook on Ubuntu (linking pages, immediately saving what you type so you don’t loose anything on sudden power loss) but has a few things I prefer:
- Notes are stored as plain text: easier to use other text editors, version control, and scripts, and if for any reason Zim fails, I can still access my data quite easily.
- The main interface makes organising and navigating notes easier.
- The Task List plugin extracts lines with possible tasks, so it’s easier to keep track of follow-ups or actions in notes by simply typing a line like:
[ ] Document my hacks in a blog post
The Task List itself is a separate window you can pull up, to see all open to do’s. But I wanted to fix a few things to make it more powerful in daily use.
The suggestions below are based on Ubuntu 10.10, and with Zim 0.49 installed as Ubuntu package.

Zim notes with tasks
The first step is to have Zim available at my finger tips, so that taking notes is instant. I want to use the key combination Win-Z to bring up the notebook. You need the wmctrl package to be able to raise the window if it already is open but buried under other windows.
sudo apt-get install wmctrl
Next, I went to the menu System > Preferences > Keyboard Shortcuts and added a custom shortcut. It starts Zim to make sure it is running (make sure your notebook is set as the default notebook to open in Zim’s preferences), then raises the window to the top:
bash -c "zim && wmctrl -R \"Notes - Zim\" "
Zim custom shortcut
I’d like to have the task list available via a keyboard shortcut. I prefer the combination Ctrl-T, which already is assigned to Format > Verbatim (monospaced). So I edited ~/.config/zim/accelmap and uncommented the relevant lines to show the task list and to apply that formatting, to assign the key combination to the task list.
(gtk_accel_path "<Actions>/TaskListPlugin/show_task_list" "<Control>t")
(gtk_accel_path "<Actions>/PageView/apply_format_code" "")
Bonus key combination: (while we’re here anyway). I have enabled the Inline Evaluator plugin in Zim, so that I can do quick math within my notebook. If I type 1500*1.19 and select the menu item Tools > Evaluate Math, Zim calculates the outcome and changes the line to: 1500*1.19= 1785.0. To make that easier, I’ll assign Ctrl-= to that function:
(gtk_accel_path "<Actions>/InlineCalculatorPlugin/eval_math" "<Control>equal")
The column with task descriptions is made wide enough to contain complete task descriptions. Which means that you usually need to scroll to see the other columns.

With many pages, seeing in which page a task resides helps a lot to understand its context. The descriptions should be limited to a more narrow column.

Task list more optimal
Diving into the source code, I found out that the developers already thought about that as well. They implemented a fixed-width column for the Maemo platform, with the remark
# FIXME probably should also limit the size of this
# column on other platforms ...
That made it really easy to change my own copy of Zim to do just that. It results in a simple patch:
--- tasklist.py.or 2011-01-15 16:36:42.624406264 +0100
+++ tasklist.py 2011-01-15 16:12:01.555792557 +0100
@@ -564,6 +564,8 @@
column.set_sort_column_id(i)
if i == self.TASK_COL:
column.set_expand(True)
+ column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ column.set_fixed_width(500)
if ui_environment['platform'] == 'maemo':
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
column.set_fixed_width(250)
It’s a good idea to keep the patch around: upgrading to a newer version of Zim would remove the hack, so I just made a script to re-apply the patch:
#!/bin/bash
# Apply patch to Zim tasklist plugin to set fixed-width task description column
# Best performed with sudo
cd /usr/share/pyshared/zim/plugins
patch < /home/rolf/bin/fix-zim-tasklist.patch
cd -
The Task List window often pops up over the notebook itself, and stays on top. Clicking on a task brings up the note in which the task resides, and focuses it on that task. But that’s not so useful if the note is hidden under the task window.
I already use Devil’s Pie, self-described as “A totally crack-ridden program for freaks and weirdos who want precise control over what windows do when they appear.” Install gdevilspie if you like a GUI to set up rules for windows.
I have plenty of screen (1920×1080) so I decided to let the notes and the task list live next to each other, with these two rules in ~/.devilspie/zim.ds
( if ( begin ( is ( window_name ) "Notes - Zim" )) ( begin ( geometry "926x1032+0+24" )))
( if ( begin ( is ( window_name ) "Task List - Zim" )) ( begin ( geometry "990x1032+930+24" )))
Zim notes and tasks side by side
My laptop has become a better notebook! At any moment, Win-Z brings up my notes, to quickly jot down something, and when in my notebook, Ctrl-T brings up the task list to let me easily navigate the to do’s and follow-ups in my notes. Staying on top of things has become a little bit easier.