diff options
author | gast0n <gast0n@texto-plano.xyz> | 2021-02-09 22:18:09 -0300 |
---|---|---|
committer | gast0n <gast0n@texto-plano.xyz> | 2021-02-09 22:18:09 -0300 |
commit | 576494faf1a272a49527dbfab675c40b5f3b0d92 (patch) | |
tree | cd01d84e685892dbbe284dc06b269c0845c78542 | |
download | scripts-576494faf1a272a49527dbfab675c40b5f3b0d92.tar.gz |
Primer commit.
-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>" |