You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
310 B
12 lines
310 B
#!/bin/bash |
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
|
srcTarget=$1 |
|
text=$(xsel) |
|
|
|
#trim |
|
text=${text##*( )} |
|
text=${text%%*( )} |
|
|
|
trResult=$($SCRIPT_DIR/trans -b $srcTarget "${text}") |
|
|
|
notify-send -t 20000 "$(echo -e "Selected text translation ${srcTarget^^}: \n${trResult}")"
|
|
|