diff options
| author | Blista Kanjo | 2022-05-31 14:39:04 -0400 |
|---|---|---|
| committer | Blista Kanjo | 2022-05-31 14:39:04 -0400 |
| commit | ee14c7ffc6408ef8d7c9238cec52402c6b280074 (patch) | |
| tree | 8517db33b42b5411f432c9922d3b88953201508d /Blista-Kanjo-DYM | |
| parent | af83c06d72b53f86b00771e988f470bf703d3df6 (diff) | |
new script: single word spell check via didyoumean
Diffstat (limited to 'Blista-Kanjo-DYM')
| -rw-r--r-- | Blista-Kanjo-DYM/README | 1 | ||||
| -rwxr-xr-x | Blista-Kanjo-DYM/dym.sh | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Blista-Kanjo-DYM/README b/Blista-Kanjo-DYM/README new file mode 100644 index 0000000..3d66324 --- /dev/null +++ b/Blista-Kanjo-DYM/README @@ -0,0 +1 @@ +Copy dym.sh to ~./local/share/scripts diff --git a/Blista-Kanjo-DYM/dym.sh b/Blista-Kanjo-DYM/dym.sh new file mode 100755 index 0000000..79374f8 --- /dev/null +++ b/Blista-Kanjo-DYM/dym.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +WORD=$(echo "\n" | ~/.local/share/dmenu-custom/dmenu -b -i -p "Check Spelling: ") + +[ -z "$WORD" ] && exit + +if [ -n "$1" ]; then + xdotool type "$WORD" +else + CORRECTED=$(dym -c $WORD -n 10 | ~/.local/share/dmenu-custom/dmenu -i -b -l 10 -p "Did you mean?:") + [ -z "$CORRECTED" ] && exit + + if [ -n "$1" ]; then + xdotool type "$CORRECTED" + else + echo -n "$CORRECTED" | xclip -selection clipboard + notify-send "'$CORRECTED' copied to clipboard." & + fi + +fi + + |
