Re: [dev] dwm: suckless way to monitor work hours

From: Anselm R Garbe <>
Date: Tue, 1 Sep 2009 10:01:22 +0100


2009/9/1 Niklas Koponen <>:
> I use dwm and my goal is to automatically track my working hours. I've
> always been poor in manually writing down my working hours to some
> calendar or using some manual tracking tool.
> My plan is to take a snaphot of the root window at certain intervals
> if there has been some mouse or keyboard activity. I also record the
> amount of activity. Then I store the information and at the end of the
> month I just generate a report based on this information.
> I use import to take the snapshot, and I was going to use xev to check
> for event activity by attaching xev to the window that has focus. The
> problem at the moment is that I don't know how to find out which is
> the window that has focus and gets the input.
> I'm not a C-programmer and my plan was to quickly prototype this with
> some scripting language.
> So how do I know (from the shell) which window has focus in dwm?
> Or better yet, has anybody already implemented this kind of tracking?

You could also use the X screen saver extension to track idleness and
add that up and subtract the result from the actual uptime.

But how do you track the time of thinking?

Kind regards,
Received on Tue Sep 01 2009 - 09:01:22 UTC

This archive was generated by hypermail 2.2.0 : Tue Sep 01 2009 - 09:12:03 UTC