diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-01-26 01:49:32 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-01-26 01:49:32 -0500 |
| commit | 52128ace9cb7dfa67811e7e6e8892efb922dc0a4 (patch) | |
| tree | 16b67487b1cb667841deee251fd3d79112d6cb86 /swipeGuessPicker.sh | |
| parent | 335955649fb0610e8e853aeb4c5746ce9c2a837c (diff) | |
| download | SwipeBehaviors-52128ace9cb7dfa67811e7e6e8892efb922dc0a4.tar.gz | |
swipeGuessPicker: refactor variables
Diffstat (limited to 'swipeGuessPicker.sh')
| -rwxr-xr-x | swipeGuessPicker.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/swipeGuessPicker.sh b/swipeGuessPicker.sh index 9e5fbd4..c344052 100755 --- a/swipeGuessPicker.sh +++ b/swipeGuessPicker.sh @@ -1,15 +1,17 @@ #!/bin/sh -rm "$XDG_RUNTIME_DIR/sgp.sock" -mkfifo "$XDG_RUNTIME_DIR/sgp.sock" -cat 0<> "$XDG_RUNTIME_DIR/sgp.sock"|suggpicker 2>/dev/null|completelyTypeWord.sh & -swipeGuess ~/.local/share/sxmo/words.txt 5 | while read -r word; do +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 "" >> "$XDG_RUNTIME_DIR/sgp.sock" + echo "" >> "$sock" else - echo "$word" >> "$XDG_RUNTIME_DIR/sgp.sock" + echo "$word" >> "$sock" fi done |
