aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/fuzzelunicode
blob: cc97f1958a4ff77918b31145c07e11de8a1292a6 (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/* | fuzzel -d -i -l 30 | sed "s/ .*//")

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

wtype "$chosen"
printf "$chosen" | wl-copy
notify-send "'$chosen' copied to clipboard." &