suckless_dictpopup/dictpopup
2023-05-27 21:52:51 +02:00

11 lines
291 B
Bash
Executable file

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