Road to Rage and Road to Rage Offline added. Road to rage requires a script that is in the speech directory to speak.
This commit is contained in:
18
speech/speak_window_title.sh
Executable file
18
speech/speak_window_title.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Adapted from the bash snippet found at:
|
||||
# https://bbs.archlinux.org/viewtopic.php?id=117031
|
||||
|
||||
while : ; do
|
||||
wnd_focus=$(xdotool getwindowfocus)
|
||||
wnd_title=$(xprop -id $wnd_focus WM_NAME)
|
||||
lookfor='"(.*)"'
|
||||
|
||||
if [[ "$wnd_title" =~ $lookfor ]]; then
|
||||
wnd_title=${BASH_REMATCH[1]}
|
||||
if [[ "$old_title" != "$wnd_title" ]]; then
|
||||
spd-say "$wnd_title"
|
||||
old_title="$wnd_title"
|
||||
fi
|
||||
fi
|
||||
sleep 0.01
|
||||
done
|
Reference in New Issue
Block a user