dotfiles-x11.localbindmenuunicode
| 1 | #!/bin/sh |
| 2 | |
| 3 | # The famous "get a menu of emojis to copy" script. |
| 4 | |
| 5 | # Get user selection via dmenu from emoji file. |
| 6 | chosen=$(cut -d ';' -f1 ~/.local/share/chars/* | dmenu -i -l 30 | sed "s/ .*//") |
| 7 | |
| 8 | # Exit if none chosen. |
| 9 | [ -z "$chosen" ] && exit |
| 10 | |
| 11 | xdotool type "$chosen" |
| 12 | printf "$chosen" | xclip -selection clipboard |
| 13 | notify-send "'$chosen' copied to clipboard." & |