#!/bin/sh

chosen=$(cat ~/.local/share/emoji/* | mew -i | sed "s/ .*//")

[ -z "$chosen" ] && exit

[ -n "$1" ] && xdotool type "$chosen" || {
	printf "%s" "$chosen" | wl-copy
	notify-send "'$chosen' copied to clipboard."
}
