I have a dumb work related chrome thing, i’d like to make it so that when a certain notification sound plays in chromium, my computer does a few things automatically for me

Does anyone know a good way to make this happen?

I imagine it’d have to be setup like:

when chrome starts playing audio && check if that audio matches soundfile.ogg && myscript.sh, but I don’t know any good cli utilities that could get something like that done, and if there are any better ideas!

  • JovialSodium@lemmy.sdf.org
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    3 months ago

    Maybe you can do something with the tampermonkey extension to catch when that audio is triggered and have it do an api call that your script catches?

    I don’t know if that’ll actually work, I know of the extension but have never it used nor am I skilled with Javascript but it seems feasible.

    • Communist@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 months ago

      That sounds like a somewhat appealing solution, however, i’d like this to be more broadly applicable, i’d like it if even if it wasn’t chrome, and was some other application making a particular noise, I could easily execute a script whenever that particular noise is played, allowing me to automate a bunch of things rather than just one specific weird thing.