Simple utility to turn swipes into words -- "plugin" for wvkbd to enable swipe-typing under wayland SXMO.
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | README.md | 35 |
2 files changed, 38 insertions, 3 deletions
@@ -7,9 +7,11 @@ mapScore: mapScore.c $(CC) mapScore.c -o mapScore docs: swipeGuess.1 mapScore.1 swipeGuess.1: swipeGuess.1.scd - scdoc < swipeGuess.1.scd > swipeGuess.1 + scdoc < swipeGuess.1.scd > $@.tmp + mv $@.tmp $@ mapScore.1: mapScore.1.scd - scdoc < mapScore.1.scd > mapScore.1 + scdoc < mapScore.1.scd > $@.tmp + mv $@.tmp $@ words-qwerty-en: /usr/share/dict/american-english mapScore grep .. /usr/share/dict/american-english | ./mapScore map.qwerty.noapos.tsv bee | sort -nr | cut -f2 > words-qwerty-en @@ -12,7 +12,7 @@ swipeGuess also provides options for returning multiple results and ignoring cer The input program should output a stream of letters "swiped through", then a newline. -This is supported by [wvkbd](https://github.com/proycon/wvkbd) since version 0.6. +This is supported by [wvkbd](https://github.com/proycon/wvkbd) since version 0.6 and [phosh-osk-stub](https://gitlab.gnome.org/guidog/phosh-osk-stub) since 0.28.0. ## wordlist @@ -64,6 +64,39 @@ If your keys are in a hexagonal layout, use mapScore like 3. `wvkbd-mobintl -O | swipeGuess /path/to/words.txt | completelyTypeWord.sh` * In SXMO, `KEYBOARD_ARGS='-O | swipeGuess /path/to/words.txt | completelyTypeWord.sh'` can be added to your ~/.profile to enable this (effective on restart). +# Usage with phosh-osk-stub + +``` +gsettings set sm.puri.phosh.osk osk-features "['key-drag']" +gsettings set sm.puri.phosh.osk.Completers.Pipe command 'swipeGuess /usr/share/swipeGuess/words/words-qwerty-en 5 | tr "\t" "\n"' +gsettings set sm.puri.phosh.osk.Completers default pipe +gsettings set sm.puri.phosh.osk completion-mode "['manual','hint']" +``` + +## Multiple suggestions + +phosh-osk-stub's pipe completer accepts multiple suggestions, newline separated. This can be scripted like + +``` +gsettings set sm.puri.phosh.osk.Completers.Pipe command 'sh -c "swipeGuess /usr/share/swipeGuess/words/words-qwerty-en 5 | tr \"\t\" \"\n\""' +``` + # Extended information [SwipeBehaviors](https://git.sr.ht/~earboxer/SwipeBehaviors) is a project that uses swipeGuess and provides more advanced functionality, like presenting several choices that can be picked with [suggpicker](https://git.sr.ht/~earboxer/suggpicker). + +# Contributing + +swipeGuess is maintained by [Zach DeCook](https://zachdecook.com/), who may or may not be reached directly for related inquiries. + +Patches and long-form discussions for this project are also accepted on my swipeKeyboard mailing list on sourcehut: ([email](mailto:~earboxer/swipeKeyboard@lists.sr.ht)/[archive](https://lists.sr.ht/~earboxer/swipeKeyboard)). + +e.g. + +``` +git config sendemail.to '~earboxer/swipeKeyboard@lists.sr.ht' +git config format.subjectPrefix 'PATCH swipeGuess' +git send-email HEAD~1 +``` + +(See `man git-send-email` or https://git-send-email.io for more information) |