#!/bin/bash timeout=5000 # 5 seconds # This just toggles the creation of the /opt/clearscm/bin/shh file if [ -f /opt/clearscm/bin/shh ]; then rm /opt/clearscm/bin/shh cp ~/.icons/ShhOff.png ~/.icons/Shh.png notify-send -t $timeout "Announcements turned on" else touch /opt/clearscm/bin/shh cp ~/.icons/ShhOn.png ~/.icons/Shh.png # Note that a -t 0 will keep the notification up. This way we can # be visually reminded that we are not receiving audio announcements notify-send -t 0 "Announcements turned off" fi