diff options
-rw-r--r-- | README | 11 | ||||
-rw-r--r-- | traductor.sh | 6 |
2 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,11 @@ +Scripts +========== + +* `traductor.sh` +Requiere permisos de ejecucion para funcionar: `chmod +x`. +Se recomienda asociarlo a un atajo de teclado. + +Dependencias: `notify-send`, `xclip`, [`trans`](https://github.com/soimort/translate-shell "Translate Shell") y conexion a Internet. + +Funcionamiento: Seleccionar el texto a traducir, presionar el atajo de teclado y el resultado se mostrara en pantalla mediante un popup. + diff --git a/traductor.sh b/traductor.sh new file mode 100644 index 0000000..a3e15c2 --- /dev/null +++ b/traductor.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Recibe como input la cadena de texto seleccionada, +# la traduce al español y devuelve el resultado en un popup. + +notify-send --icon=info --urgency=critical "$(xclip -o)" "<b>$(xclip -o | trans -b :es)</b>" |