diff options
| author | Blista Kanjo | 2022-12-19 17:57:41 -0500 |
|---|---|---|
| committer | Blista Kanjo | 2022-12-19 17:57:56 -0500 |
| commit | 5b7bbad13b3f85cdf7af75a652a196314461a927 (patch) | |
| tree | c808dfa04fa9b31d5e7e4044daf4a8ab569cd60b /.local/share/scripts | |
| parent | d38b409a17b79bf29b7ca1f0f1b4483e43c69c4d (diff) | |
refactor: fixed directory structure
Diffstat (limited to '.local/share/scripts')
| -rwxr-xr-x | .local/share/scripts/dym.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.local/share/scripts/dym.sh b/.local/share/scripts/dym.sh new file mode 100755 index 0000000..79374f8 --- /dev/null +++ b/.local/share/scripts/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 + + |
