#!/bin/sh # Simple emoji picker (through dmenu) # Needs a file listing emojis like this one: # https://github.com/matj1/emoji-picker/raw/master/emoji11.tsv EMOJI=$(cut -d ';' -f1 $HOME/.local/share/misc/emoji | dmenu -i -l 15 -h 23 -e `xdotool getwindowfocus` | sed "s/ .*//") # Do nothing if nothing is selected [ "$EMOJI" != "" ] || exit # Print the emoji directly. # A delay on `xdotool` seems to be necessary to avoid the printing # process to glitch out (and not print the emoji) echo -n "$EMOJI" | xdotool type --delay 100 --file -