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() {
|
license() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -95,13 +95,14 @@ cat << "EOF" > ~/.SequenceStormReader
|
|||||||
#!/usr/bin/env 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
|
||||||
sleep 0.05
|
sleep 0.05
|
||||||
done
|
done
|
||||||
|
|
||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
unset cliptext
|
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
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
tmp="$(pbpaste 2> /dev/null)"
|
tmp="$(pbpaste 2> /dev/null)"
|
||||||
else
|
else
|
||||||
@ -113,17 +114,25 @@ while pgrep -u $USER ^SequenceStorm &> /dev/null ; do
|
|||||||
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
|
if [[ "${cliptext,,}" =~ key|load|private|says|terminal ]]; then
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
say -v alex -r 300 "$cliptext"
|
say -v alex -r 300 "$cliptext"
|
||||||
|
else
|
||||||
|
if [[ -w "${socketFile}" ]]; then
|
||||||
|
echo "<#APPEND#>$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
|
||||||
else
|
else
|
||||||
spd-say -w -r 50 -- "$cliptext"
|
spd-say -w -r 50 -- "$cliptext"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
say -v alex -r 300 "$cliptext"
|
say -v alex -r 300 "$cliptext"
|
||||||
|
else
|
||||||
|
if [[ -w "${socketFile}" ]]; then
|
||||||
|
echo "$cliptext" | socat - UNIX-CLIENT:"${socketFile}"
|
||||||
else
|
else
|
||||||
spd-say -r 50 -- "$cliptext"
|
spd-say -r 50 -- "$cliptext"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
sleep 0.05
|
sleep 0.05
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user