Live data from Hacker News

Show HN: Onhold – Play sounds while and after shell jobs complete

github.com

1–10 of 16 posts

Re: Show HN: Onhold – Play sounds while and after shell jobs complete

#4
In iTerm 2, I have it set up to play a sound when certain commands finish, but it hadn't occurred to me that having hold music while the job is still processing could be useful.

Yet now that I think about it, there have been times when I've briefly stepped away from my desk and missed the notification sound. This utility would solve that problem!

Re: Show HN: Onhold – Play sounds while and after shell jobs complete

#8
I have been using a script for years also called ding. By default it emits one control-G, but if it is passed a numeric argument, it emits N dings in a row with a sleep 1 between each.

A few years back I was in a grind on a project where I would kick off regressions, then 30-90 minutes later they'd finish depending on how many slots I was getting in the server farm. I had a script that sent a message to my personal email account with a magic subject line. On my email client I had a filter that detected that subject line and attached a "play a sound" action to that filter, with the sound being an alarm clock going off. That way I could kick off a regression, take a nap, then get woken up when it finished.

Re: Show HN: Onhold – Play sounds while and after shell jobs complete

#9
post #7

I wish there was something like this that worked for processes running in remote ssh sessions.

It doesn't do hold music, but check out https://notify.run/. It uses browser notifications so the machine that receives the notification need not be the machine that sends it.

Re: Show HN: Onhold – Play sounds while and after shell jobs complete

#10
post #4

In iTerm 2, I have it set up to play a sound when certain commands finish, but it hadn't occurred to me that having hold music while the job is still processing could be useful. Yet now that I think about it, there have been times when I've briefly stepped away from my desk and missed the notification sound. This utility would solve that problem!

I use the idletime (among other factors) to decide the alarm's duration.

  getidle-darwin () {
      ioreg -c IOHIDSystem | awk '/HIDIdleTime/ {print 
  $NF/1000000000; exit}'
  }
Post reply on HN