dotfiles/.local/bin/fuzzelunicode

14 lines
337 B
Bash
Executable File

#!/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." &