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