Skip to content

Instantly share code, notes, and snippets.

@marcosnils
Created August 22, 2022 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosnils/d0ec1f4dbbbe97f4addb9b5fa157fa1c to your computer and use it in GitHub Desktop.
Save marcosnils/d0ec1f4dbbbe97f4addb9b5fa157fa1c to your computer and use it in GitHub Desktop.
rofi translate menu
#!/bin/bash
trans="trans"
input=`rofi -dmenu -p "translate" -lines 0`
if [[ $input != "" ]]; then
cat <($trans :en+es+pt "$input" -brief) | rofi -dmenu -p "$input" -lines 2 | xclip -sel clip
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment