With the following script you can translate small sentences and words using a keyboard shortcut!
- start via shortcut
- or via Terminal
- enter text
- notification with translation
- clipboard with translation
The following packages are needed
- Menu: rofi, rofi-dmenu
- Notifications: libnotify
- Translation: translate-shell
- Clipboard: xclip
Install dependencies
sudo pacman -S rofi rofi-dmenu libnotify translate-shell xclip
Install script
#!/bin/sh
# translates text from rofi prompt to clipboard and creates a notfication
notify-send -t 5000 "Translation" "$(trans -b "$(rofi -dmenu -p translate &)" | tr -d '\n' | xclip -sel clip -f)"
If you see something in the script that can be improved, feel free to write a comment :)
Congratulations @sebov1c! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
To support your work, I also upvoted your post!
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @sebov1c!
You raised your level and are now a Red Fish!
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit