diff options
| author | 2026-05-13 13:43:30 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:30 +0100 | |
| commit | 30817cf6dc975ec514dce2b39b2e946d77e14ba3 (patch) | |
| tree | 03989a087902c6a0b279f728c532aa2c0d7526a9 /dot_config/sway | |
| parent | 63a171d6b989f3a0b7250ff1621e6630a37345ea (diff) | |
| download | dotfiles-30817cf6dc975ec514dce2b39b2e946d77e14ba3.tar.gz dotfiles-30817cf6dc975ec514dce2b39b2e946d77e14ba3.tar.bz2 dotfiles-30817cf6dc975ec514dce2b39b2e946d77e14ba3.zip | |
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.
Diffstat (limited to 'dot_config/sway')
| -rw-r--r-- | dot_config/sway/executable_emoji-picker.sh | 8 | ||||
| -rw-r--r-- | dot_config/sway/executable_emoji-wofi.sh | 7 |
2 files changed, 10 insertions, 5 deletions
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" |
