Updated sequence storm reader for Mac compatibility.
This commit is contained in:
parent
91741afa64
commit
858211865d
@ -44,7 +44,7 @@ write_sequence_storm_reader() {
|
||||
fi
|
||||
# Here-document start
|
||||
cat << "EOF" > ~/.SequenceStormReader
|
||||
#! /bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Wait for the game to be launched
|
||||
while ! pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
||||
@ -54,16 +54,28 @@ done
|
||||
export DISPLAY=:0
|
||||
unset cliptext
|
||||
while pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
tmp="$(pbpaste 2> /dev/null)"
|
||||
else
|
||||
tmp="$(xclip -selection clipboard -o 2> /dev/null)"
|
||||
fi
|
||||
tmp="${tmp//%/ percent }"
|
||||
if [ "$tmp" != "$cliptext" ] ; then
|
||||
cliptext="$tmp"
|
||||
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
say -v alex -r 300 "$cliptext"
|
||||
else
|
||||
spd-say -w -r 50 -- "$cliptext"
|
||||
fi
|
||||
else
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
say -v alex -r 300 "$cliptext"
|
||||
else
|
||||
spd-say -r 50 -- "$cliptext"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user