-
-
Save catscury/c701332986e16277476a7f9a25d11ec0 to your computer and use it in GitHub Desktop.
Linux translate text in buffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Устанавливаем обёртку над гугл транслейт | |
https://github.com/soimort/translate-shell | |
2 - Устанавливаем необходимые пакеты: | |
sudo apt-get install libnotify-bin xsel | |
3 - Создаём файл с именем sel-transl и копируем в него | |
#!/usr/bin/env bash | |
notify-send -u critical "$(xsel -o)" "$(xsel -o | trans -no-ansi -b :ru)" | |
4 - Делаем этот файл исполняемым и перемещаем его в /usr/bin/: | |
sudo chmod 777 ./seltr && sudo mv ./seltr /usr/bin/ | |
5 - Создаем хоткей System settings->Keyboard->Shortcuts->Custom Shortcuts В поле команды вводить имя файла в /usr/bin/ (команда терминала) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment