summaryrefslogtreecommitdiff
path: root/.local/bin/emoji-copy
blob: 9ddc05dd9fec5b19e28278d32b3d97f0c4e86f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Runs a prompt to choose an emoji to copy
# to the clipboard. Some font-awesome icons are
# also supported.

choice=$( cat ~/.local/share/emoji | dmenu -i -p "Font Awesome & Emojis: ")

icon=$(echo $choice | sed "s/^\(.\).*$/\1/")

printf "$icon" | xsel -b


[ -z "$icon" ] && notify-send -a "Clipboard:" "Operation Cancelled"
[ -z "$icon" ] || notify-send -a "Clipboard:" "$icon has been copied!"