1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash window=$(xdotool getactivewindow) set -- junk "$(cut -d '|' -f 1 ~/.config/emoji | dmenu -p emoji)" shift if [ $# -eq 0 ]; then exit fi emoji=$(grep "^$(echo $@)|" ~/.config/emoji | cut -d '|' -f 2 | tr -s '\r') echo "$emoji" | clip xdotool type --window "$window" "$emoji" xdotool windowactivate "$window"