Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- result="$1"
- config="$HOME/.config/rofi/config-translate.rasi"
- theme="$HOME/.config/rofi/theme-translate.rasi"
- card_path="$HOME/cards/"
- command="/usr/local/sbin/rofi-1.6.1 -p Перевести -config $config -theme $theme -dmenu"
- if [[ -n "$1" && "$1" != *"Найдено"* ]]; then
- # result="$(sdcv -n -u dictd_www.mova.org_sokrat_enru $1)"
- result=$(sdcv -n -u 'LingvoUniversal (En-Ru)' -u dictd_www.mova.org_sokrat_enru -u en-ru-bars "$result")
- # result="$(sdcv -n $1)"
- echo -e "$result" | $command
- card_text=$(echo -e "$result" | head -9 | tail -7)
- convert -background black -fill white -font Tahoma -size 300x250 caption:"$card_text" "$card_path""$1".png
- else
- $command -mesg "Введи слово для перевода"
- fi
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement