Updated sequence storm reader script to use the newly available self-voicing function available to orca from simple orca plugin system.
This commit is contained in:
parent
4e1f3bd61e
commit
57f6ec1e4b
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
license() {
|
||||
cat << EOF
|
||||
@ -95,13 +95,14 @@ cat << "EOF" > ~/.SequenceStormReader
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Wait for the game to be launched
|
||||
while ! pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
||||
while ! pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
export DISPLAY=:0
|
||||
unset cliptext
|
||||
while pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
||||
socketFile="$(find /tmp -maxdepth 1 -name "orca-*.sock")"
|
||||
while pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
tmp="$(pbpaste 2> /dev/null)"
|
||||
else
|
||||
@ -113,17 +114,25 @@ while pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
||||
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
say -v alex -r 300 "$cliptext"
|
||||
else
|
||||
if [[ -w "${socketFile}" ]]; then
|
||||
echo "<#APPEND#>$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
|
||||
else
|
||||
spd-say -w -r 50 -- "$cliptext"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
say -v alex -r 300 "$cliptext"
|
||||
else
|
||||
if [[ -w "${socketFile}" ]]; then
|
||||
echo "$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
|
||||
else
|
||||
spd-say -r 50 -- "$cliptext"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user