From 65efc27dfc43ffada4627e1a8ad0c07262b9735d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 6 Feb 2025 16:52:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20passthrough=20of=20emoji?= =?UTF-8?q?=20to=20custom=20type=20cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Custom type commands now also receive the emoji to be typed just like the default type commands. If your type program relies on getting an emoji on stdin, then it is much easier to invoke bemoji with echo. An example with cat: `bemoji -e | cat` --- bemoji | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bemoji b/bemoji index 50b9898..481af8f 100755 --- a/bemoji +++ b/bemoji @@ -244,13 +244,14 @@ _clipper() { # Set default typing util _typer() { + totype=$(cat -) + if [ -n "$BEMOJI_TYPE_CMD" ]; then # shellcheck disable=SC2068 - ${BEMOJI_TYPE_CMD[@]} + ${BEMOJI_TYPE_CMD[@]} "$totype" return fi - totype=$(cat -) if [ -n "$WAYLAND_DISPLAY" ] && command -v wtype >/dev/null 2>&1; then wtype -s 30 "$totype" elif [ -n "$DISPLAY" ] && command -v xdotool >/dev/null 2>&1; then