Does anyone know how to execute a script when a certain sound plays?
thevoidzero @ thevoidzero @lemmy.world Posts 9Comments 280Joined 2 yr. ago
thevoidzero @ thevoidzero @lemmy.world
Posts
9
Comments
280
Joined
2 yr. ago
Someone already talked about the XY problem, so I'll say this.
Why sound notification instead of notification content? If your notification program (dunst in my case) have pattern matching or calling scripts based on patterns and the script has access to which app, notification title, contents etc. then it's just about calling something in your bash script.
And any time you wanna add that functionality to something else, add one more line with a different pattern or add a condition in your script. Comparing text is lot more reliable than audio.
Of course your use case could be completely different, so maybe give some examples of use case so people can give you different ways to solve that instead of just the one you're thinking of.