Last active
October 30, 2019 16:15
-
-
Save meysampg/d3389713d70103ceb1cbb8a8f96f9568 to your computer and use it in GitHub Desktop.
translate word and send notify
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
#!/usr/bin/env bash | |
translate() { | |
notify-send "$1" $(trans -no-bidi -b :@fa "$1") | |
} | |
select_and_translate() { | |
translate "$(xclip -out -selection primary)" | |
} | |
select_and_translate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment