diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2024-11-11 21:16:03 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2024-11-11 21:16:03 +0100 |
| commit | 7e2dff6d3bf76eb46d4736cbda4178cbc8f4efa1 (patch) | |
| tree | e24747e40673196a7e8fb34791bc10d8e9342b42 /local/bin/translate-prompt | |
| parent | 90df8624a43c440ffa77c02f74f4ef1cb27a6648 (diff) | |
| download | dotfiles-7e2dff6d3bf76eb46d4736cbda4178cbc8f4efa1.tar.gz dotfiles-7e2dff6d3bf76eb46d4736cbda4178cbc8f4efa1.tar.bz2 dotfiles-7e2dff6d3bf76eb46d4736cbda4178cbc8f4efa1.zip | |
Add translate from text selection
Diffstat (limited to 'local/bin/translate-prompt')
| -rwxr-xr-x | local/bin/translate-prompt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/local/bin/translate-prompt b/local/bin/translate-prompt index d1588da..fb23b56 100755 --- a/local/bin/translate-prompt +++ b/local/bin/translate-prompt @@ -10,6 +10,7 @@ command -v rofi > /dev/null && choice="$( $menu_exec <<EOF +From Selection From Clipboard Open Editor EOF @@ -20,6 +21,9 @@ EOF text_file="$(mktemp /tmp/translate_prompt_text_XXXXXX)" case "$choice" in + 'From Selection') + xsel --output > "$text_file" + ;; 'From Clipboard') xclip -out -selection clipboard > "$text_file" ;; |
