Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1.  
  2. #!/bin/bash
  3.  
  4. text=`xsel -o`
  5.  
  6. if [ "$text" == "" ]; then
  7.     exit 0
  8. fi
  9.  
  10. translated=`~/Dropbox/Scripts/yatranslate/yatranslate.py "$text"`
  11.  
  12. lang="`echo $translated | cut -d "~" -f1`"
  13. text="`echo $translated | cut -d "~" -f2`"
  14.  
  15. notify-send "$lang" "$text"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement