I’ve been using Workrave to help me remember to take breaks from the computer. I always end up not using it after a while though.
That’s because I get irritated by it because it gets frustrating after a while. I’ve always been a bit too optimistic about my breaks. Specifically because the program comes with an insane setting as standard.
However, this time I’ve set the settings to:
- One two-minute microbreak every hour.
- One ten minute break every three hours.
- Eight hour PC-time, give me one extra hour three times if I ask for it.
Hope I’ll use it for a longer time now.
A key press is an activity!
I quickly found another of my common irritations after using it. Workrave is not detecting my keypresses properly, so even though I am sitting at the computer, it thinks I’m not.
This especially happens with the microbreaks, they never seem to actually work. I’m very often reading stuff on the screen, only pressing “Page down” button once every 10 seconds.
The reason Workrave behaves so strangely is because it uses an algorithm like this:
- Get keyinput / mousemove or whatever
- If mode is MODE_IDLE:
- Set mode MODE_NOISE
- Else if
last_timeis more than
ACTIVITYms ago, set
So, as you see, there’s a config setting
ACTIVITY that messes things up. The code is not exactly like that, but close enough.
Anyway, when I found out that, I was happy. Easy fix!
But not so easy anyway. I saw there was a config system going on there, and tried finding the workrave.ini file residing in .workrave/. Sadly, I couldn’t find it, so I made it, with:
Ok, that worked. It dumped a whole lot of new config options into that file, and when restarting Workrave, it stopped working. That was probably because many of the options were truly bogus.
Instead of fixing it, — I found out that my default config provider was gconf, so I rather did it that way.
The real fix
gconf-editor, I browsed to
apps/workrave and inputted
"monitor/activity" as an integer with value 0.
Restarting Workrave, and lo! It resets the counter when you press one button, just as I wanted!
It also doesn’t react on the mouse when it’s moved less than 3 pixels from where it was. That’s hard coded, so you’d have to change the source and compile it.
Another thing is that with the settings I have, which is 2 minute microbreak every hour, it’s still way too easy for it to register my 2 minute break when I did in fact not use it. It’s very possible for me to read a full screenful of a text (and think hard about it), or watch a video for over 2 minute.
Workrave has it’s own «reading mode» button for that. However, I don’t like that because
- I have to remember it
- It’s not easily accessible
- I have to remember turning it off
I could fix something with point 2 and Workrave’s dbus integration. But, well, it’s still a drag.
I think maybe we could raise the IDLE-time limit. These are the default limits:
NOISE = 9 seconds ACTIVITY = 1 second IDLE = 5 seconds
So we know what ACTIVITY is, I’ve set that to 0, so that it doesn’t need 2 events 1 second apart in order to register activity.
NOISE is how long until it waits until it sees a new keyboard input resets its ACTIVITY-lookup. Having that as 9 seconds is OK for me now that I’ve set ACTIVITY to 0.
IDLE is the time it waits until it starts counting. I’m not too happy with it at 5 seconds. I’m using Workrave with much bigger time lapses, so it should be really be upped.
I’ll put IDLE at 60 seconds, so that it won’t start counting IDLE time unless I’ve been off the keyboard for 60 seconds. So this will still make me take my 2 minute microbreak when I’m not touching the computer for 3 minutes, but it won’t happen as often.
So opening up gconf-editor and going to
apps/workrave/monitor, and then inputting idle with integer value 0 will fix it.
And then Workrave is better to use!