~earboxer/SwipeBehaviors

ref: 52128ace9cb7dfa67811e7e6e8892efb922dc0a4 SwipeBehaviors/swipeGuessPicker.sh -rwxr-xr-x 387 bytes
52128aceZach DeCook swipeGuessPicker: refactor variables 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
sock="$XDG_RUNTIME_DIR/sgp.sock"
words=~/.local/share/sxmo/words.txt
rm "$sock"
mkfifo "$sock"
cat 0<> "$sock"|suggpicker 2>/dev/null|completelyTypeWord.sh &
swipeGuess "$words" 5 | while read -r word; do
	set -- $word
	if test "$1" && ! test "$2"; then
		wtype "${1:1}"
	elif ! test "$2"; then
		echo "" >> "$sock"
	else
		echo "$word" >> "$sock"
	fi
done

killall suggpicker