dotfiles/Utils/emojenu
Frank Villaro-Dixon 9f3e60ccf4 uncommited shit
2019-08-28 17:59:12 +02:00

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"