9 comments

  • TeMPOraL 1282 days ago
    Here's what I'd love to have: an ambience. 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.

    Basically, like the bridge of Enterprise D[0] (or its main engineering[1]).

    The reasoning here is to recreate the experience of "feeling" 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].

    Last time I mentioned it publicly, someone told me they use widgets with resource usage graphs for that purpose. I've started using them too, but I noticed that I generally don't look at them. Even semi-transparent, they'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.

    Anyone knows of tooling relevant to implement this idea?

    --

    [0] - https://www.youtube.com/watch?v=XajaCX88NnU

    [1] - https://www.youtube.com/watch?v=GwLsBldD9kQ

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

  • jawns 1282 days ago
    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!

    • Siira 1282 days ago
      I use the idletime (among other factors) to decide the alarm's duration.

        getidle-darwin () {
            ioreg -c IOHIDSystem | awk '/HIDIdleTime/ {print 
        $NF/1000000000; exit}'
        }
  • tasty_freeze 1282 days 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.

    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.

  • sodimel 1282 days ago
    Here's what I did to make sound come after a command:

      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('play -nq -t alsa synth {} sine {}'.format(duration, freq))
    
    The only requirements are python and sox[0].

    Used like this:

      mycommand && python3 sound.py
    
    --

    [0] - https://manpages.debian.org/jessie/sox/play.1.en.html

  • yomansat 1282 days ago
    To ring terminal bell after running process

    > Ctrl+g # (^g)

    Or any of:

    > tput bel

    > echo -n -a "\a"

    > echo $'\a'

    • Gys 1282 days ago
      On MacOS instead of tput bel I use: `say "finished"` (or something)

      For non-Mac users: `say` will activate a voice saying some text

    • wing-_-nuts 1282 days ago
      +1 for tput bel. I like it because it's memorable. I have it aliased on the end of my unit / integration tests. It's nice for long running processes.
  • titanomachy 1282 days ago
    I like how it plays nice with linux pipes.

    I've used this on macOS before to accomplish the same thing:

    `afplay ~/song.mp3 & do_something_slow; pkill afplay; tput bel`

  • VectorLock 1282 days 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.
  • jefurii 1282 days ago
    I wish there was something like this that worked for processes running in remote ssh sessions.
    • paulgb 1282 days ago
      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.
  • psadri 1282 days ago
    Shameless plug: if you want to track the progress and state of long running jobs check out:

    https://progvis.com