diff options
Diffstat (limited to 'Blista-Kanjo-DYM/dym.sh')
| -rwxr-xr-x | Blista-Kanjo-DYM/dym.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 + + |
