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