Live data from Hacker News

Show HN: Lightweight time-management CLI tool

github.com

11–20 of 21 posts

Re: Show HN: Lightweight time-management CLI tool

#12
post #10
post #9

Earlier quoted context omitted.

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.

Re: Show HN: Lightweight time-management CLI tool

#13
post #12
post #10

Earlier quoted context omitted.

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.

Re: Show HN: Lightweight time-management CLI tool

#16
post #14
post #5

> Around 100 LOC Say what? To ring the bell after sleeping based on a parameter?

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

Re: Show HN: Lightweight time-management CLI tool

#17
post #2

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"

Re: Show HN: Lightweight time-management CLI tool

#19
post #12
post #10

Earlier quoted context omitted.

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.

X11 bell almost never works for me.

Re: Show HN: Lightweight time-management CLI tool

#20

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
Post reply on HN