Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Breaktime – A CLI timer forcing you to take breaks by locking your Mac (github.com/ncthis)
15 points by lunarcave on April 8, 2015 | hide | past | favorite | 6 comments



Neat, but not to knock the tech, use of Node seems like a little overkill? See https://github.com/j-baker/breaktime-sh


You're right, it is overkill. But I'm much faster in javascript than bash, and npm is a neat way to deliver updates as well. I dig your bash version though!


An improvement in my opinion would be to set an approximate break time and then lock you out around that time when your behavior switches -- I'd imagine that having your screen lock when you're in the zone solving a complex problem would be as bad as someone interrupting you.

It would be pretty easy to find my natural break times by seeing when I open gmail and hackernews or when I create a commit. I'd probably benefit a lot from a walk instead of surfing around the internet for 15 minutes as a break.

I hate being interrupted while I'm working though -- this would infuriate me as much as a knock on my closed door for a question that could have been emailed.


I use a short shell function for this:

  take-a-break ()
  {
    if [ $# -lt 1 ]; then
        length="60"
    else
        length="$1"
    fi

    echo "Take a break in $length minutes at $(date --date="+$length minutes" +%T)."

    sleep "${length}m"
    gnome-screensaver-command -l
}

Replace gnome-screensaver-command with whatever screensaver you use.


I need the opposite.


A CLI timer forcing you to work by unlocking your Mac ?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: