4 ms·
Show HN: Breaktime – A CLI timer forcing you to take breaks by locking your Mac
- thomaskcr 12y agoAn 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.
- CHY872 12y agoNeat, 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 12y agoYou'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!
- davidshepherd7 12y agoI 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 12y agoI need the opposite.
- tomesch 12y agoA CLI timer forcing you to work by unlocking your Mac ?