~earboxer/SwipeBehaviors

2414e6b200348b7c37b44ff77a9ba668b92dc9c6 — Zach DeCook a month ago 1a18ec9 master
Documentation: Add man pages in scdoc format
4 files changed, 98 insertions(+), 1 deletions(-)

A SwipeBehavior.7.scd
A sb_picker.sh.1.scd
M sb_predictor.sh
A sb_predictor.sh.1.scd
A SwipeBehavior.7.scd => SwipeBehavior.7.scd +46 -0
@@ 0,0 1,46 @@
SwipeBehavior(7) "SwipeBehaviors"

# NAME
SwipeBehavior - provide function for swipe keyboard

# SYNOPSIS

```
wvkbd -O | sb_something.sh
```

# DESCRIPTION

A _SwipeBehavior_ is a program which provides extra functionality to a swipe-capable keyboard.

. The swipe-capable keyboard writes a line of output, representing what keys were intersected during a swipe.
. The _SwipeBehavior_ acts on that.
. This repeats as you use the keyboard.
. When the swipe-capable keyboard closes its stream, the _SwipeBehavior_ quits itself.

A _SwipeBehavior_ could do many things
- typing words
- prompt the user for more input
- log your keystrokes for the NSA

So, you should obviously only use trustworthy software as your _SwipeBehavior_ (i.e. free software which you have audited yourself).

# EXAMPLES

To use a _SwipeBehavior_ linked to by *swipeB* in SXMO-sway,++
put this in your profile and relog.

```
export KEYBOARD_ARGS="-O | swipeB"
```

Then you can choose your preferred behavior using a symlink, e.g.

```
ln -s "$(which sb_something.sh)" ~/.local/bin/swipeB
```

and reopen the keyboard.

# SEE ALSO
*suggpicker*(1) *wvkbd*(1)

A sb_picker.sh.1.scd => sb_picker.sh.1.scd +25 -0
@@ 0,0 1,25 @@
sb_picker.sh(1) "SwipeBehaviors"

# NAME
sb_picker.sh - SwipeBehavior to pick swipeGuessed words

# DESCRIPTION

This *SwipeBehavior*(7) types words, and has multiple behaviors
- If a swipe has only one high-ranking match, type that word
- Otherwise, present up to 5 words in *suggpicker*(1)

# DEPENDENCIES

- *suggpicker*(1)
- *swipeGuess*(1)
- *mapScore*(1)
- *completelyTypeWord.sh*
- _~/.local/share/sxmo/words.txt_++
Lexicon sorted by swipe length
- _~/.local/share/sxmo/keyboard.map.tsv_++
tsv representation of hex-grid keyboard layout++
used for ranking choices

# SEE ALSO
*mapScore*(1) *suggpicker*(1) *swipeGuess*(1) *SwipeBehavior*(7)

M sb_predictor.sh => sb_predictor.sh +0 -1
@@ 6,7 6,6 @@ tw="$kl/pred.tfw"
complete="$XDG_RUNTIME_DIR/pred.complete.bool"
words=~/.local/share/sxmo/words.txt
twow=~/.local/share/sxmo/count_2w.txt
keymap=~/.local/share/sxmo/keyboard.map.tsv
rm -f "$sock" "$lw" "$complete"
mkdir -p "$kl"
chmod 700 "$kl"

A sb_predictor.sh.1.scd => sb_predictor.sh.1.scd +27 -0
@@ 0,0 1,27 @@
sb_predictor.sh(1) "SwipeBehaviors"

# NAME
sb_predictor.sh - SwipeBehavior to predict your next word

# DESCRIPTION

- All strokes are logged to remember the previous word
- On swipe, provides a multiple choice *swipeGuess*(1) with *suggpicker*(1)
- On *suggpicker*(1) choice, provide word completions or next word predictions
- On space, provides next word predictions

# DEPENDENCIES

- *wl-ime-type*(1)
- *suggpicker*(1)
- *swipeGuess*(1)
- *quick5*
- _~/.local/share/sxmo/words.txt_++
Lexicon sorted by swipe length
- _~/.local/share/sxmo/count_2w.txt_++
List of bigrams for predictions

# SEE ALSO
*suggpicker*(1) *swipeGuess*(1) *wl-ime-type*(1) *SwipeBehavior*(7)