Advertisement
constantin-net

rofi-translate-ruen

Oct 4th, 2023
976
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 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="/usr/local/sbin/rofi-1.6.1 -p Translate -config $config -theme $theme -dmenu"
  6. if [[ -n "$1" && "$1" != *"Найдено"* ]]; then
  7.     result=$(sdcv -n -u 'LingvoUniversal (Ru-En)' "$result")
  8.     echo -e "$result" | $command
  9. else
  10.     $command -mesg "Enter a word for translation"
  11. fi
  12. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement