Categories

Undistract

An Attention Watchdog

This is abandoned, there are better options out there e.g. Stay Focused for Chrome

Undistract is an attention watchdog for the Free desktop. That is, it monitors your computer usage for such things as web browsing, and it gently but persistently reminds you to get back to work. After a while it starts to minimize the windows of, say, your web browser, in order to remind you more forcefully. It is not meant to police your usage, but rather to distract you away from absorbing distractions, back to work. Hence the name. I developed it on Ubuntu Linux but it should work with any modern X desktop (GNOME, KDE, XFCE) on any *nix systems.

Features:

  • Maintains an internal “distraction level” of how much time you have spent using, say, a web browser.
  • When “distracted” usage reaches a certain point, it starts to remind you that you should be working with ‘toaster’ style notifications.
  • When usage of a distracting program reaches a critical point, it will minimize the windows of the distracting program you are using.
  • The “distraction level” decreases slowly over time if you stay away from your browser.
  • Can tell, based on local network and time, whether you are at work or at home, and doesn’t bother you if you are home in the evening or early morning, when you should be allowed some distraction!

The design philosophy is discussed further in this blog post although several implementation details have evolved since then.

Download:

  • 2007-12-17 undistract-0.2.tar.gz
    • Uses libnotify instead of xosd.
    • The ‘severe’ action is now to minimize the distracting window rather than change virtual desktops, which was quite specific to my desktop usage.
    • Uses GTK event loop which makes monitoring a lot more efficient.
    • More sophisticated usage of libwnck to determine which windows may/may not
    • Simplified some of the code and tried to de-jargonize the config file.

Requirements:

  1. python-notify – for notifications (in Ubuntu, install package python-notify)
  2. PyXss X-Screensaver Extension for Python(in Ubuntu, package x11proto-scrnsaver-dev is required to build that module (get xlibs-dev, libxss-dev too, and maybe some other stuff))
  3. Python bindings to libwnck, for window manager interaction (in Ubuntu, install python-gnome2-desktop)
  4. Standard *nix command ‘ping’.

License: GPL

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA 02111-1307, USA.

One reply on “Undistract”

Leave a Reply

Your email address will not be published. Required fields are marked *