Advertisement
constantin-net

rofi-translate

Apr 23rd, 2021 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.52 KB | None | 0 0
  1. #!/bin/bash
  2. result="$1"
  3. config="$HOME/.config/rofi/config-translate.rasi"
  4. theme="$HOME/.config/rofi/theme-translate.rasi"
  5. command="rofi-1.6.1 -p Перевести -config $config -theme $theme -dmenu"
  6. if [[ -n "$1" && "$1" != *"Найдено"* ]]; then
  7. #    result="$(sdcv -n -u dictd_www.mova.org_sokrat_enru $1)"
  8.     result=$(sdcv -n -u 'LingvoUniversal (En-Ru)' "$result")
  9. #    result="$(sdcv -n $1)"
  10.     echo -e "$result" | $command
  11. else
  12.     $command -mesg "Введи слово для перевода"
  13. fi
  14. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement