Show HN: Onhold – Play sounds while and after shell jobs complete
1–10 of 16 posts
Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#2I've used this on macOS before to accomplish the same thing:
`afplay ~/song.mp3 & do_something_slow; pkill afplay; tput bel`
Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#3Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#4Yet 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
#5Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#6> Ctrl+g # (^g)
Or any of:
> tput bel
> echo -n -a "\a"
> echo $'\a'
Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#7Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#8A 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
#9I wish there was something like this that worked for processes running in remote ssh sessions.
Re: Show HN: Onhold – Play sounds while and after shell jobs complete
#10In 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!
getidle-darwin () {
ioreg -c IOHIDSystem | awk '/HIDIdleTime/ {print
$NF/1000000000; exit}'
}