Changed to use jpg
[clearscm.git] / bin / shh
1 #!/bin/bash
2 timeout=5000 # 5 seconds
3 touchfile=/opt/clearscm/data/shh
4
5 # This just toggles the creation of the /opt/clearscm/bin/shh file
6 if [ -f $touchfile ]; then
7   rm $touchfile
8   cp ~/.icons/ShhOff.png ~/.icons/Shh.png
9 else
10   # Stop currently playing audio
11   killall play
12   # Stop any Google TTS
13   kill -9 $(cat /tmp/simple_google_tts.pid)
14   # Clean up tmp
15   rm -rf /tmp/simple_google_tts.*
16   # Touch shh file
17   touch $touchfile
18   # Change the icon
19   cp ~/.icons/ShhOn.png ~/.icons/Shh.png
20 fi