ugol/pomodoro — pull request #281 by partlyhuman (2012-11-25 02:11:04+00:00)
Title: Browsing nanny

Hi again, Ugo.

This pull request will help users who want to overcome bad browsing habits and monitor yourself from cheating on your Pomodoros. If you activate it in preferences and set up a list of blacklisted URL patterns, Pomodoro.app will trigger an internal interruption when you browse to a distracting website. This works especially well with voice triggers on interruptions - and the interruption timer gives you time to get back to work.

This is what I was working toward with my previous pull request. Using a Safari extension didn't work out very well. Opening the "pomodoro://" uri triggered the commands nicely, but Safari always lost focus in the process, which I couldn't get around.

So instead, I built this "Browsing Nanny" into Pomodoro.app itself (this also means less software for the end user to install). It uses AppleScript to monitor Chrome and Safari for open, active, frontmost tabs - only penalizing you if you're actively goofing off. This happens on the tick notification - once a second.

I will add Firefox support once it supports scripting. (Currently I can get some properties of the windows using the standard script suite - but not the URL). If users demand WebKit or Opera I can do that and continue to own this feature.

It would be great if you included this feature in future builds. I find it incredibly useful!

Thank you,
Roger Braunstein