aboutsummaryrefslogtreecommitdiff
path: root/emoji.sh
blob: 6cc6ca51642a0f40e9e31270184f2e07f4e437d0 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

# Feeds an emoji list into dmenu and allows to select one into clipboard

file="$XDG_CONFIG_HOME/emoji"
selected="$(cat "$file" | dmenu -i -l 20 -p "Choose an emoji:" | cut -d' ' -f1)"
[ -z "$selected" ] && dunstify "No emoji selected." && exit 0
echo "$selected" | xsel -ib
dunstify "Copied $(xsel -ob)"