Last active
December 15, 2016 16:01
-
-
Save Monsterovich/3dc425623ab38821a4316da022a979ae to your computer and use it in GitHub Desktop.
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 | |
# A pop-up dictionary based on translate-shell and notifications | |
# Bind this script to a hotkey and select a word to get its dictionary entry. | |
# https://github.com/soimort/translate-shell | |
# ' and " are removed | |
text=$(xsel -o | sed "s/[\"']//g") | |
path=$(dirname "$0") | |
output=$(sh ${path}/translate --no-ansi ${text}) | |
notify-send -u critical "Translation of '$text'" "$output" | |
#EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment