diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 022392b..edd0548 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -43,10 +43,15 @@ done export DISPLAY=:0 unset cliptext while pgrep -u $USER ^SequenceStorm &> /dev/null ; do - tmp="$(xclip -selection clipboard -o)" + tmp="$(xclip -selection clipboard -o 2> /dev/null)" + tmp="${tmp//%/ percent }" if [ "$tmp" != "$cliptext" ] ; then cliptext="$tmp" - spd-say -r 50 "$cliptext" + if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then + spd-say -w -r 50 -- "$cliptext" + else + spd-say -r 50 -- "$cliptext" + fi fi sleep 0.05 done