11 lines
320 B
Bash
Executable file
11 lines
320 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Looks up argument instead, if provided
|
|
word=${1:-$(xclip -o)}
|
|
[ -z $word ] && exit 1
|
|
|
|
sdcv -n --utf8-output -e "$word" | tail -n +5 | sed 's|<br>|\n|g' | sed 's|<[^>]*>||g' | xargs -d '\n' popup 2>/dev/null
|
|
|
|
# Instead of sed also possible:
|
|
# `lynx -dump -stdin -assume_charset=UTF-8 -display_charset=UTF-8`
|