Gnotime Nag Me Patch
Gnotime is a tool for keeping track of time spent working, an
electronic timesheet if you will. It's quite good at what it
does, infact it's probably the best one available for Linux
machines.
Timesheet systems are great, as long as you remember to use them.
Unfortunatly, I am absolutely hopless at remembering to use them.
Gnotime has a standard feature that makes it a little easier on me by
popping up a reminder to turn it on every hour (configurable) if it's
turned off
(not timing). It also will detect when I've stopped working (gone
idle), stop the timer and bring up a dialog allowing me to restart it
when I come back.
However that wasn't good enough for me, inevitably I'd turn it on for
Project A, work for an hour or two, get distracted by Project B and
work on that for a while, but forget to switch Gnotime from timing A to
timing B. Gnotime
would attribute all the time I'd worked on project B to project A.
Most annoying, especially if you don't notice until the end of the day,
when all the time you spent on B, C, D, E, F and G has been attributed
to A.
What I needed was quite simple, I wanted the stop-and-prompt-on-idle
function to simply happen every hour wether I was idle or not, so that
every hour I would get a prompt to ask if I had stopped working on the
current job and if so how long ago I stopped. I could then either
just hit the yes button to keep working, or adjust the time and hit the
no button, go back to Gnotime and change the project.
With that in mind I did a quick skim of the relevant parts of the
Gnotime source (showing my C rust very very badly) and hacked in a
couple of lines to do exactly that. I also improved the start-project-on-idle dialog to allow back-dating
the time you started a project with a slider, the text entry that was
already present in that dialog didn't appear to even be hooked up
(which probably explains why I could never make it work).
I
figure somebody else might
find it useful as well. A patch is available below, but I found it a
bit of bugger to compile (lots of dependancies), so you can download my precompiled version.
Probably as long as you can run the standard gnotime you can run this
it'll need the standard gnome and gtk libs, libguile, libgtkhtml and
probably a bunch of other stuff you already have.
If you want to compile yourself here is the patch and steps to follow.
- Download the patch
- Download the gnotime source (from the gnotime site)
- Apply the patch
"cd gnotime-2.2.1/;patch --ignore-whitespace -p1 </path/to/gnotime.patch" - Compile & Install Gnotime