summarylogtreecommitdiffstats
path: root/translateselection
diff options
context:
space:
mode:
authorGrigorii Horos2015-10-11 16:41:53 +0300
committerGrigorii Horos2015-10-11 16:41:53 +0300
commit72b78171feb56a965ae29594174d3cf8f142ccc7 (patch)
treef1dd590bb9dbd2e434ff830ae1b7516025d15950 /translateselection
downloadaur-72b78171feb56a965ae29594174d3cf8f142ccc7.tar.gz
Initial commit
Diffstat (limited to 'translateselection')
-rwxr-xr-xtranslateselection3
1 files changed, 3 insertions, 0 deletions
diff --git a/translateselection b/translateselection
new file mode 100755
index 00000000000..ccc03d57619
--- /dev/null
+++ b/translateselection
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+notify-send -i "applications-education-language" -u critical "$(xsel -o)" "$(curl -s -X POST -A "Mozilla/5.0" -H "Content-Type: application/x-www-form-urlencoded" -d "client=t" -d "sl=auto" -d "tl=$LANGUAGE" -d "text=$(xsel -o | sed "s/[\"'<>]//g")" 'http://www.google.com/translate_a/t' | sed 's/\[\[\[\"//' | cut -d \" -f 1)" \ No newline at end of file