22 lines
448 B
Bash
Executable file
22 lines
448 B
Bash
Executable file
#!/bin/bash
|
|
|
|
window=$(xdotool getactivewindow)
|
|
|
|
pushd "$(dirname "$0")"
|
|
|
|
#set -- junk $(cat kaomoji | cut -d '|' -f 1 | dmenu -p emoji)
|
|
set -- junk $(cat kaomoji | rofi -dmenu -i | cut -d'|' -f1)
|
|
|
|
shift
|
|
|
|
if [ $# -eq 0 ]; then
|
|
exit
|
|
fi
|
|
|
|
emoji=$(cat kaomoji | grep "^$(echo $@)|" | cut -d '|' -f 2 | tr -s '\r')
|
|
|
|
#echo "$emoji" | xclip -selection clipboard
|
|
|
|
xdotool windowactivate $window
|
|
echo -n "$emoji" | xclip -sel clip
|
|
xdotool type "$emoji"
|