Use cmd_
[llpp/slowscroll.git] / misc / dicx
blob28eff9c1a24b4f74a7dad25d910a8488e2150c25
1 #!/bin/sh
2 set -e
4 exec 1>&2 2>/dev/null
6 test "$1" = "-" && src="cat" || src="xclip -o"
8 eval $(xdotool search --class i3bar getwindowgeometry --shell)
9 rofi="rofi -dmenu -yoffset $((HEIGHT+2)) -location 2"
11 pag() { \
12 sed -e 1d \
13 -e 's; _\([A-Z]\); \1;p' \
14 -e '/^$/d' -e '/^-->/d' \
15 | eval $rofi -l 20 -p 'Done'
18 phrase="$($src | eval $rofi -markup -p 'Lookup: ')"
19 sdcv -n --utf8-input --utf8-output "$phrase" | pag