Skip to content

Instantly share code, notes, and snippets.

@ngocnhan2003
Last active March 30, 2023 04:38
Show Gist options
  • Select an option

  • Save ngocnhan2003/b3ab6f44e0d34273a370bb42e8a7c292 to your computer and use it in GitHub Desktop.

Select an option

Save ngocnhan2003/b3ab6f44e0d34273a370bb42e8a7c292 to your computer and use it in GitHub Desktop.
#!/usr/bin/sh
# wget git.io/trans
# chmod +x ./trans
VALUE=$(xclip -out -selection primary)
TRANS=$(trans en:vi "$VALUE" -no-ansi -show-original=N)
notify-send "$VALUE" "$TRANS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment