some fun
This commit is contained in:
parent
e3e92a2884
commit
3f14cee31f
11
dotfiles-old/bin/autotranslate
Executable file
11
dotfiles-old/bin/autotranslate
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$dmenu" ] || dmenu=dmenu
|
||||
|
||||
lang="$LANG"
|
||||
# lots of potentially wrong assumptions here
|
||||
printf "%s\n" "$lang" | grep "_" >/dev/null 2>&1 \
|
||||
&& lang="$(printf "%s\n" "$lang" | cut -d '_' -f 1)" \
|
||||
|| lang=en
|
||||
|
||||
printf "%s\n" "$(xclip -o)" | translate auto $lang | "$($dmenu -p "Press Enter to dismiss.")"
|
Loading…
Reference in New Issue
Block a user