voidrice/.local/bin/dmenuunicode

19 lines
507 B
Text
Raw Normal View History

#!/bin/sh
2019-11-23 19:26:35 +00:00
# The famous "get a menu of emojis to copy" script.
2018-10-29 19:01:24 +00:00
# Must have xclip installed to even show menu.
xclip -h 2>/dev/null || exit 1
2018-10-29 19:01:24 +00:00
chosen=$(cut -d ';' -f1 ~/.local/share/larbs/emoji | dmenu -i -l 20 | sed "s/ .*//")
[ "$chosen" != "" ] || exit
2020-02-09 14:17:43 +00:00
# If you run this command with an argument, it will automatically insert the character.
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
notify-send "'$chosen' copied to clipboard." &
fi