[dev] dwm: suckless way to monitor work hours

From: Niklas Koponen <niklas.koponen_AT_iki.fi>
Date: Tue, 1 Sep 2009 10:07:47 +0300


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?

Received on Tue Sep 01 2009 - 07:07:47 UTC

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