From f9ad0ef0cbd974a2f7aeb710ac310b6656f14f7b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 17 Nov 2020 15:31:32 -0500 Subject: [PATCH] More improvements to sequence storm reading. --- audiogame-manager.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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