emoji (532B)
1 #!/bin/sh 2 # Copied from Luke Smith's dotfiles 3 4 # The famous "get a menu of emojis to copy" script. 5 6 # Must have xclip installed to even show menu. 7 xclip -h 2>/dev/null || exit 1 8 9 chosen=$(cut -d ';' -f1 ~/.config/emoji | dmenu -i -l 20 | sed "s/ .*//") 10 11 [ "$chosen" != "" ] || exit 12 13 # If you run this command with an argument, it will automatically insert the character. 14 if [ -n "$1" ]; then 15 xdotool key Shift+Insert 16 else 17 echo "$chosen" | tr -d '\n' | xclip -selection clipboard 18 notify-send "'$chosen' copied to clipboard." & 19 fi