Skip to content

Instantly share code, notes, and snippets.

@NuxRo
Last active December 11, 2019 13:51
Show Gist options
  • Save NuxRo/efc22c63817a4a916cef3aa1ac4e470c to your computer and use it in GitHub Desktop.
Save NuxRo/efc22c63817a4a916cef3aa1ac4e470c to your computer and use it in GitHub Desktop.
Detect if MATE screen saver is running and mute audio
#!/bin/bash
# run this in the background once you log in
while true;
do mate-screensaver-command -q|grep -wq active && amixer -q -D pulse sset Master off || amixer -q -D pulse sset Master on; sleep 10; done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment