commit d3747093e40dd060fec5c544e5f6aba22f5535c6 parent 4cee45067d677f76f75e29da175eb51eae5e12fd Author: awy <awy@awy.one> Date: Sat, 27 Dec 2025 22:41:16 +0300 emoji selector Diffstat:
| A | .local/bin/menu/dmenuunicode | | | 20 | ++++++++++++++++++++ |
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/.local/bin/menu/dmenuunicode b/.local/bin/menu/dmenuunicode @@ -0,0 +1,20 @@ +#!/bin/sh + +# The famous "get a menu of emojis to copy" script. + +# Get user selection via dmenu from emoji file. +chosen=$(cut -d ';' -f1 ~/.local/share/extras/chars/* | mew -i -l 30 | sed "s/ .*//") + +# Exit if none chosen. +[ -z "$chosen" ] && exit + +# If you run this command with an argument, it will automatically insert the +# character. Otherwise, show a message that the emoji has been copied. +if [ -n "$1" ]; then + # currently only ascii supported in wlrctl + # wlrctl keyboard type"$chosen" + wtype "$chosen" +else + printf "%s" "$chosen" | wl-copy + notify-send "'$chosen' copied to clipboard." & +fi