dmenu-symbol (743B)
1 #!/bin/sh 2 # Give dmenu list of all unicode characters to copy. 3 # Shows the selected character in dunst if running. 4 5 # Get user selection via dmenu from emoji file. 6 chosen=$(grep -v "#" -h ~/.config/dmenuunicode/unicode_emoji.txt ~/.config/dmenuunicode/unicode_greek.txt ~/.config/dmenuunicode/unicode_math.txt ~/.config/dmenuunicode/unicode_latin.txt | dmenu -i -l 20 -fn mono-12 | sed "s/ .*//") 7 8 # Exit if none chosen. 9 [ -z "$chosen" ] && exit 10 11 # If you run this command with an argument, it will automatically insert the 12 # character. Otherwise, show a message that the emoji has been copied. 13 if [ -n "$1" ]; then 14 xdotool type "$chosen" 15 else 16 printf "$chosen" | xclip -selection clipboard 17 notify-send "'$chosen' copied to clipboard." & 18 fi