#!/bin/sh selection=$(xclip -o) dict_lookup=$(sdcv -n --utf8-output -e "$selection") if echo "$dict_lookup" | grep -F "Nothing similar to"; then notify-send "Nothing found for: $selection" else echo "$dict_lookup" | tail -n +5 | sed 's|
|\n|g' | sed 's|<[^>]*>||g' | xargs -d '\n' popup fi