From 30817cf6dc975ec514dce2b39b2e946d77e14ba3 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:30 +0100 Subject: fix(emoji): split skin-tone filter into its own picker script The previous one-liner stuffed an inline pipeline into BEMOJI_PICKER_CMD via 'sh -c' with three layers of nested quoting, which broke under bemoji's eval ("grep: 1: Syntax error: Unterminated quoted string"). Move the filter+wofi pipeline into emoji-wofi.sh and point the env var directly at it. No more quoting gymnastics. --- dot_config/sway/executable_emoji-picker.sh | 8 +++----- dot_config/sway/executable_emoji-wofi.sh | 7 +++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 dot_config/sway/executable_emoji-wofi.sh diff --git a/dot_config/sway/executable_emoji-picker.sh b/dot_config/sway/executable_emoji-picker.sh index e713d0d..2a18283 100644 --- a/dot_config/sway/executable_emoji-picker.sh +++ b/dot_config/sway/executable_emoji-picker.sh @@ -1,11 +1,9 @@ #!/bin/sh # Bemoji wrapper: drop skin-tone variants (U+1F3FB..U+1F3FF) so the # picker isn't cluttered with five copies of every people-emoji. -# Bemoji pipes its emoji list to $BEMOJI_PICKER_CMD on stdin. +# Bemoji pipes its emoji list to whatever BEMOJI_PICKER_CMD evaluates +# to, so we point it at our small filter script. set -eu -filter='LC_ALL=C.UTF-8 grep -vP "[\x{1F3FB}-\x{1F3FF}]"' -picker="wofi --dmenu --prompt Emoji --style $HOME/.config/wofi/style.css" - -export BEMOJI_PICKER_CMD="sh -c '$filter | $picker'" +export BEMOJI_PICKER_CMD="$HOME/.config/sway/emoji-wofi.sh" exec bemoji -tc "$@" diff --git a/dot_config/sway/executable_emoji-wofi.sh b/dot_config/sway/executable_emoji-wofi.sh new file mode 100644 index 0000000..0633401 --- /dev/null +++ b/dot_config/sway/executable_emoji-wofi.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Bemoji picker backend: filter out skin-tone variants +# (U+1F3FB..U+1F3FF) before handing the emoji list to wofi. +set -eu + +LC_ALL=C.UTF-8 grep -vP '[\x{1F3FB}-\x{1F3FF}]' \ + | wofi --dmenu --prompt Emoji --style "$HOME/.config/wofi/style.css" -- cgit v1.3.1