TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

43 pointsby this_machineover 4 years ago

9 comments

TeMPOraLover 4 years ago
Here&#x27;s what I&#x27;d love to have: an <i>ambience</i>. Turning metrics like CPU, memory, IO and network loads into subtle sounds. Some more important background jobs execution into more distinct, but still somewhat subtle sound.<p>Basically, like the bridge of Enterprise D[0] (or its main engineering[1]).<p>The reasoning here is to recreate the experience of &quot;feeling&quot; the machine. Like drivers do with their cars. Like we could do in the past with HDD sounds, and now sometimes with fan noise[2].<p>Last time I mentioned it publicly, someone told me they use widgets with resource usage graphs for that purpose. I&#x27;ve started using them too, but I noticed that <i>I generally don&#x27;t look at them</i>. Even semi-transparent, they&#x27;re mostly just a blob of color that occasionally obstructs some UI I need to interact with. But sound is a separate channel, and easier to process subconsciously.<p>Anyone knows of tooling relevant to implement this idea?<p>--<p>[0] - <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=XajaCX88NnU" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=XajaCX88NnU</a><p>[1] - <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=GwLsBldD9kQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=GwLsBldD9kQ</a><p>[2] - During a recent debugging session, I accidentally gained some insight about the problem by noticing the fan is making less noise than it should during certain tests.
评论 #24852757 未加载
评论 #24863619 未加载
jawnsover 4 years ago
In iTerm 2, I have it set up to play a sound when certain commands finish, but it hadn&#x27;t occurred to me that having hold music while the job is still processing could be useful.<p>Yet now that I think about it, there have been times when I&#x27;ve briefly stepped away from my desk and missed the notification sound. This utility would solve that problem!
评论 #24851741 未加载
tasty_freezeover 4 years ago
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.<p>A few years back I was in a grind on a project where I would kick off regressions, then 30-90 minutes later they&#x27;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 &quot;play a sound&quot; 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.
sodimelover 4 years ago
Here&#x27;s what I did to make sound come after a command:<p><pre><code> import os from random import seed from random import random seed(a=None) def rnd(): return 200 + (random() * (2100 - 200)) duration = 0.5 freq = rnd() os.system(&#x27;play -nq -t alsa synth {} sine {}&#x27;.format(duration, freq)) </code></pre> The only requirements are python and sox[0].<p>Used like this:<p><pre><code> mycommand &amp;&amp; python3 sound.py </code></pre> --<p>[0] - <a href="https:&#x2F;&#x2F;manpages.debian.org&#x2F;jessie&#x2F;sox&#x2F;play.1.en.html" rel="nofollow">https:&#x2F;&#x2F;manpages.debian.org&#x2F;jessie&#x2F;sox&#x2F;play.1.en.html</a>
yomansatover 4 years ago
To ring terminal bell after running process<p>&gt; Ctrl+g # (^g)<p>Or any of:<p>&gt; tput bel<p>&gt; echo -n -a &quot;\a&quot;<p>&gt; echo $&#x27;\a&#x27;
评论 #24852563 未加载
评论 #24852411 未加载
titanomachyover 4 years ago
I like how it plays nice with linux pipes.<p>I&#x27;ve used this on macOS before to accomplish the same thing:<p>`afplay ~&#x2F;song.mp3 &amp; do_something_slow; pkill afplay; tput bel`
VectorLockover 4 years ago
I used `tput bel` after everything I want to get notified on if its running long. Extra good since it works over ssh as well.
jefuriiover 4 years ago
I wish there was something like this that worked for processes running in remote ssh sessions.
评论 #24851711 未加载
psadriover 4 years ago
Shameless plug: if you want to track the progress and state of long running jobs check out:<p><a href="https:&#x2F;&#x2F;progvis.com" rel="nofollow">https:&#x2F;&#x2F;progvis.com</a>