daemon: double check that the display is locked before speaking
[espeaktime] / src / espeaktime-now.sh
1 #!/bin/sh
2
3 # if we ever get empty or bogus arguments, espeak will try to
4 # read text from stdin, and hang -- prevent that.
5 exec < /dev/null
6
7 if [ "$EST_IGN_SILENT" = "1" ]; then
8         fname=/tmp/espeaktime-$$.wav
9
10         export PULSE_PROP="module-stream-restore.id=x-maemo-applet-profiles event.id=ringtone-preview"
11         espeak -w $fname "${@}"
12         play-sound $fname
13         rm -f $fname
14 else
15         exec espeak "${@}"
16 fi