voidrice/.local/bin/dmenuunicode
Linus K 090e5b1d6e
Use script name instead of "notify-send"
Many typical graphical environments also show the app name. Having "notify-send" there looks kinda hacky.
2020-02-03 15:33:02 +01:00

19 lines
558 B
Bash
Executable File

#!/usr/bin/env sh
# The famous "get a menu of emojis to copy" script.
# Must have xclip installed to even show menu.
xclip -h 2>/dev/null || exit
chosen=$(grep -v "#" ~/.local/share/larbs/emoji | dmenu -i -l 20 -fn Monospace-18)
[ "$chosen" != "" ] || exit
c=$(echo "$chosen" | sed "s/ .*//")
echo "$c" | tr -d '\n' | xclip -selection clipboard
notify-send -a `basename "$0"` "'$c' copied to clipboard." &
s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
echo "$s" | tr -d '\n' | xclip
notify-send -a `basename "$0"` "'$s' copied to primary." &