News for hackers. Stuff that matters.
Re:Show HN: Lightweight time-management CLI tool by atrudeau on Monday October 03, 2016 @05:25PM (#12631474)
I recently started using Timetrap ( https://github.com/samg/timetrap) and find fantastic. Covers a lot of corner cases while still being incredibly simple to use.
Re:Show HN: Lightweight time-management CLI tool by rojobuffalo on Monday October 03, 2016 @08:05PM (#12632398)
But does it beep at you? That actually looks awesome though--thanks for sharing that.
Re:Show HN: Lightweight time-management CLI tool by kickingvegas on Monday October 03, 2016 @05:46PM (#12631610)
On Unix/Linux you have "at" http://www.tldp.org/LDP/GNU-Linux-Tools-Summary/html/schedul.... For the Mac, however "at" is disabled (for battery saving reasons? or for working with laptops that sleep?) but you can turn it on.
Re:Show HN: Lightweight time-management CLI tool by luxpir on Monday October 03, 2016 @04:30PM (#12631053)
Excellent. Will investigate. Currently using espeak to call out pomodoros (among other things - weather, motivational quotes, reminders) at set times. But of course you tune out after a while. This might be a more flexible solution.

EDIT: CLI is the future :)

Re:Show HN: Lightweight time-management CLI tool by luxpir on Tuesday October 04, 2016 @05:24AM (#12634271)
OK, based on the comment thread I'm now trying this:

    sleep 25m; espeak "Take a break!"; notify-send "Get a cup of coffee, stretch, ignore existential angst"
Re:Show HN: Lightweight time-management CLI tool by plicense on Tuesday October 04, 2016 @03:11AM (#12633810)
Consider using \b instead of printing a new line every time. I've a huge scrollback configured and it can silently crash my terminal given a large enough wake time!
Re:Show HN: Lightweight time-management CLI tool by liviu- on Tuesday October 04, 2016 @02:05PM (#12637751)
Great point -- there's a pull request addressing this issue just now: https://github.com/liviu-/ding/pull/4
Re:Show HN: Lightweight time-management CLI tool by rojobuffalo on Monday October 03, 2016 @08:09PM (#12632412)
This made me smile. I usually pop open the chrome timer or use my phone. I also just started trying out Strict Timer (chrome extension). As simple as these are, I think you've managed to reduce the motion necessary from the user to its absolute lowest level for a parameterized timer. Thanks for the tool.
Re:Show HN: Lightweight time-management CLI tool by grewil on Tuesday October 04, 2016 @06:04AM (#12634409)
Emacs package Chronos: https://libraries.io/emacs/chronos
Re:Show HN: Lightweight time-management CLI tool by pep_guardiola on Monday October 03, 2016 @09:27PM (#12632705)
Sweet! I saved the link. My intention is to take a look at the source code and then write my own ding-ding cli tool. It will be fun and I think it will give me a nice feeling when using it.

Thanks for the inspiration!

Re:Show HN: Lightweight time-management CLI tool by ams6110 on Monday October 03, 2016 @07:35PM (#12632259)
> Around 100 LOC

Say what? To ring the bell after sleeping based on a parameter?

Re:Show HN: Lightweight time-management CLI tool by lgas on Monday October 03, 2016 @08:06PM (#12632402)
To be fair it does slightly more than that (relative times, absolute times, etc) but it is somewhat ironic considering that it advertises itself as an alternative to one liners like "sleep 4231; beep".
Re:Show HN: Lightweight time-management CLI tool by tingol on Monday October 03, 2016 @08:14PM (#12632432)
You can do sleep 15m; beep
Re:Show HN: Lightweight time-management CLI tool by duaneb on Monday October 03, 2016 @08:30PM (#12632488)
One of the reasons to use this is to avoid beep, which may not even be enabled on your machine.
Re:Show HN: Lightweight time-management CLI tool by tingol on Monday October 03, 2016 @09:44PM (#12632771)
Use echo '\a' that's what this program uses anyway... It's literally sleep $1; echo '\a' or you can use at if you want exact time.
Re:Show HN: Lightweight time-management CLI tool by michaelcampbell on Monday October 03, 2016 @10:37PM (#12632956)
Yes, anything can be done in a different way.
Re:Show HN: Lightweight time-management CLI tool by swiley on Tuesday October 04, 2016 @06:17AM (#12634450)
X11 bell almost never works for me.
Re:Show HN: Lightweight time-management CLI tool by zokier on Monday October 03, 2016 @11:24PM (#12633117)
GNU sleep is around 150 loc, and does significantly less...
Re:Show HN: Lightweight time-management CLI tool by glandium on Tuesday October 04, 2016 @04:08AM (#12634003)
GNU programs are not a reference. They must have usage(), and handle --help and --version. Even /bin/true.

  coreutils-8.25$ wc -l src/true.c
  80 src/true.c
Re:Show HN: Lightweight time-management CLI tool by liviu- on Tuesday October 04, 2016 @02:06PM (#12637763)
Ding has `--version`, and a help message too :P

To be honest, a big chunk of it is just handling user input and attempting to provide useful error messages.