aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--dot_config/sway/executable_emoji-picker.sh8
-rw-r--r--dot_config/sway/executable_emoji-wofi.sh7
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"