dotfiles-x11/.local/bin/dmenuunicode

14 lines
359 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/* | 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." &