Skip to content

Instantly share code, notes, and snippets.

@orschiro
Last active November 29, 2021 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save orschiro/46d75fce983ebf4f5d9aa199cd781606 to your computer and use it in GitHub Desktop.
Save orschiro/46d75fce983ebf4f5d9aa199cd781606 to your computer and use it in GitHub Desktop.
Temporarily mute Ubuntu's notification for undisturbed work
#!/bin/bash
echo "Temporarily muting notifications until aborted..."
killall -s SIGSTOP notify-osd
keepgoing=1
trap '{ echo "sigint"; keepgoing=0; }' SIGINT
while (( keepgoing )); do
sleep 5
done
echo "Unmuting notifications..."
killall -s SIGCONT notify-osd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment