blob: 6b166721fa2263b89eb5b7ab9f1775798d6ac2b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/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 -
|