mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
3c433a3457
Made a bash script and used dwn to set the keybind for it. dictd for the dictionary. WordNet for the database. st for the ui
15 lines
412 B
Bash
Executable File
15 lines
412 B
Bash
Executable File
#!/usr/bin/env bash
|
||
|
||
word=$(xclip -o -selection "clipboard")
|
||
|
||
if [ -z "$word" ]; then
|
||
notify-send "No query."
|
||
exit 1
|
||
fi
|
||
|
||
st \
|
||
-n "dictionary" \
|
||
-g 74x20+800 \
|
||
-f "JetBrainsMono Nerd Font:size=12" \
|
||
sh -c "dict -d wn \"$word\" | colorit | sed -e '1,3d' -e 's/\[34;47m/[34m/g' | bat --style=plain --paging=always";
|