Skip to content

Instantly share code, notes, and snippets.

@ZurgInq
Forked from orschiro/notification-mute.sh
Created November 29, 2021 05:04
Show Gist options
  • Save ZurgInq/3f01f0e04f09b4e49863bc7ae3f298ab to your computer and use it in GitHub Desktop.
Save ZurgInq/3f01f0e04f09b4e49863bc7ae3f298ab 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