Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:f64b634dd8
This commit is contained in:
13
dots/.bin/rofi-trans
Executable file
13
dots/.bin/rofi-trans
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
options="nl:en\nen:nl\nnl:fr\nfr:nl\nen:fr\nfr:en\nnl:de\nde:nl"
|
||||
|
||||
selected=$(echo -en "$options" | rofi -dmenu -p "source?:target?" -i)
|
||||
|
||||
# notify-send --app-name= -t 3000 "$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" \
|
||||
# | tr -d '\n' \
|
||||
# | xclip -sel clip -f)"
|
||||
|
||||
translation="$(trans "$selected" -b "$(rofi -dmenu -p "$selected" &)" | tr -d '\n')"
|
||||
|
||||
echo -e "Copy" | rofi -p "translation" -dmenu -i -mesg "$translation" | xargs -I{} echo -n "$translation" | xclip -selection clipboard
|
||||
Reference in New Issue
Block a user