

Show HN: Breaktime – A CLI timer forcing you to take breaks by locking your Mac - lunarcave
https://github.com/ncthis/breaktime

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

~~~
lunarcave
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!

------
thomaskcr
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.

------
davidshepherd7
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.

------
sjtrny
I need the opposite.

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

