19 lines
533 B
Plaintext
19 lines
533 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
dict -h localhost -d gcide "$@" > /home/gmgauthier/.local/tmp/"${1}".txt 2>&1
|
||
|
|
||
|
content=$(cat /home/gmgauthier/.local/tmp/"${1}".txt);
|
||
|
|
||
|
if [[ "${content}" == *"No definitions found"* ]]; then
|
||
|
icon="/home/gmgauthier/.local/bin/img/caution-48.png"
|
||
|
else
|
||
|
icon="/home/gmgauthier/.local/bin/img/checkmark-32.png"
|
||
|
fi
|
||
|
|
||
|
zenity --text-info \
|
||
|
--window-icon="${icon}" \
|
||
|
--filename=/home/gmgauthier/.local/tmp/"${1}".txt \
|
||
|
--font="IBM Plex Mono Medium 11" \
|
||
|
--width=750 \
|
||
|
--height=600 2> /dev/null
|