News for hackers. Stuff that matters.
Re:Ask HN: Staying focused on your project by vosper on Tuesday August 25, 2015 @08:53AM (#10116066)
I've recently added a repeating popup reminder to my Mac - it pops up a dialog box every 30 minutes that says "Are you wasting time?". The answer is allowed to be "yes" sometimes - I need breaks - but the point is to make sure it's a conscious choice, and that 30 minutes of browsing or playing games doesn't turn into 2 hours.
Re:Ask HN: Staying focused on your project by helsinki on Tuesday August 25, 2015 @09:07AM (#10116139)
How did you enable a popup to appear every thirty minutes on OSX?
Re:Ask HN: Staying focused on your project by bentrevor on Tuesday August 25, 2015 @09:49AM (#10116417)
You can use `osascript` to show a popup. Depending on which shell you're using, it would look something like this:

    for i in {1..4}; do
      sleep $(expr 60 \* 30)
      osascript -e 'tell app "System Events" to display dialog "Are you wasting time?"'
    done
Re:Ask HN: Staying focused on your project by cweagans on Tuesday August 25, 2015 @10:36AM (#10116774)
Or just put the osascript line in your crontab?
Re:Ask HN: Staying focused on your project by swsieber on Tuesday August 25, 2015 @12:57PM (#10117879)
You could do notifications via hammerspoon. It's probably overkill, but you could probably work in a custom active window time monitoring system.