diff options
Diffstat (limited to '.scripts/emoji')
-rwxr-xr-x | .scripts/emoji | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.scripts/emoji b/.scripts/emoji new file mode 100755 index 0000000..2d22796 --- /dev/null +++ b/.scripts/emoji @@ -0,0 +1,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" | xclip -selection clipboard +xdotool type --window "$window" "$emoji" + +xdotool windowactivate "$window" |