Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Lightweight time-management CLI tool (github.com/liviu-)
72 points by liviu- on Oct 3, 2016 | hide | past | favorite | 20 comments



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.


But does it beep at you? That actually looks awesome though--thanks for sharing that.


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.


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 :)


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"


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!


Great point -- there's a pull request addressing this issue just now: https://github.com/liviu-/ding/pull/4


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.


Emacs package Chronos: https://libraries.io/emacs/chronos


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!


> Around 100 LOC

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


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


You can do sleep 15m; beep


One of the reasons to use this is to avoid beep, which may not even be enabled on your machine.


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.


Yes, anything can be done in a different way.


X11 bell almost never works for me.


GNU sleep is around 150 loc, and does significantly less...


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


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.




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

Search: