projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug in setbg
[clearscm.git]
/
bin
/
shh
diff --git
a/bin/shh
b/bin/shh
index
f70c361
..
7e82eba
100755
(executable)
--- a/
bin/shh
+++ b/
bin/shh
@@
-1,15
+1,20
@@
#!/bin/bash
timeout=5000 # 5 seconds
#!/bin/bash
timeout=5000 # 5 seconds
+touchfile=/opt/clearscm/data/shh
# This just toggles the creation of the /opt/clearscm/bin/shh file
# This just toggles the creation of the /opt/clearscm/bin/shh file
-if [ -f
/opt/clearscm/bin/shh
]; then
- rm
/opt/clearscm/bin/shh
+if [ -f
$touchfile
]; then
+ rm
$touchfile
cp ~/.icons/ShhOff.png ~/.icons/Shh.png
cp ~/.icons/ShhOff.png ~/.icons/Shh.png
- notify-send -t $timeout "Announcements turned on"
else
else
- touch /opt/clearscm/bin/shh
+ # Stop currently playing audio
+ killall play
+ # Stop any Google TTS
+ kill -9 $(cat /tmp/simple_google_tts.pid)
+ # Clean up tmp
+ rm -rf /tmp/simple_google_tts.*
+ # Touch shh file
+ touch $touchfile
+ # Change the icon
cp ~/.icons/ShhOn.png ~/.icons/Shh.png
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
fi