summaryrefslogtreecommitdiff
path: root/.local/bin/dmenuunicode
blob: 2d4bf38ba64b6dbec43459169c42b751bebee993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

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

# Get user selection via dmenu from emoji file.
chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | dmenu -i -l 30 | sed "s/ .*//")

# Exit if none chosen.
[ -z "$chosen" ] && exit

xdotool type "$chosen"
printf "$chosen" | xclip -selection clipboard
notify-send "'$chosen' copied to clipboard." &