summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmenuunicode
blob: 1a14bf42483d11a9c9aaa6a5c2f454f2d352871d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# The famous "get a menu of emojis to copy" script.

# Must have xclip installed to even show menu.
xclip -h 2>/dev/null || exit 1

chosen=$(cut -d ';' -f1 ~/.local/share/larbs/emoji | dmenu -i -l 20 | sed "s/ .*//")

[ "$chosen" != "" ] || exit

if [ -n "$1" ]; then
	xdotool key Shift+Insert
else
	echo "$chosen" | tr -d '\n' | xclip -selection clipboard
	notify-send "'$chosen' copied to clipboard." &
fi