🐛 Fix passthrough of emoji to custom type cmd
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`
This commit is contained in:
parent
50e838cf73
commit
65efc27dfc
1 changed files with 3 additions and 2 deletions
5
bemoji
5
bemoji
|
|
@ -244,13 +244,14 @@ _clipper() {
|
||||||
|
|
||||||
# Set default typing util
|
# Set default typing util
|
||||||
_typer() {
|
_typer() {
|
||||||
|
totype=$(cat -)
|
||||||
|
|
||||||
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
if [ -n "$BEMOJI_TYPE_CMD" ]; then
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
${BEMOJI_TYPE_CMD[@]}
|
${BEMOJI_TYPE_CMD[@]} "$totype"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
totype=$(cat -)
|
|
||||||
if [ -n "$WAYLAND_DISPLAY" ] && command -v wtype >/dev/null 2>&1; then
|
if [ -n "$WAYLAND_DISPLAY" ] && command -v wtype >/dev/null 2>&1; then
|
||||||
wtype -s 30 "$totype"
|
wtype -s 30 "$totype"
|
||||||
elif [ -n "$DISPLAY" ] && command -v xdotool >/dev/null 2>&1; then
|
elif [ -n "$DISPLAY" ] && command -v xdotool >/dev/null 2>&1; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue