Clipboard-translator will now start on launch of Bokurano Daibouken 1 and 2.
This commit is contained in:
@ -12,7 +12,18 @@ export dictionaryFile="${XDG_CONFIG_HOME:-$HOME/.config}/storm-games/audiogame-m
|
||||
if [[ ! -r "$dictionaryFile" ]]; then
|
||||
touch "$dictionaryFile"
|
||||
fi
|
||||
while : ; do
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 application name."
|
||||
fi
|
||||
|
||||
# Wait for the application to start
|
||||
while ! pgrep -u "$USER" ^$1 &> /dev/null ; do
|
||||
sleep 0.05
|
||||
done
|
||||
|
||||
# Read so long as the application is running
|
||||
while pgrep -u "$USER" ^$1 &> /dev/null ; do
|
||||
newText=""
|
||||
translatedText=""
|
||||
newText="$(xclip -d "${DISPLAY:-:0}" -selection clipboard -o 2> /dev/null)"
|
||||
|
Reference in New Issue
Block a user