From ef6dff4cce15186a66ba34cdd7bd39958ebf7f58 Mon Sep 17 00:00:00 2001 From: awy Date: Tue, 29 Jul 2025 03:42:18 +0300 Subject: first commit --- .local/bin/dmenuunicode | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 .local/bin/dmenuunicode (limited to '.local/bin/dmenuunicode') diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode new file mode 100755 index 0000000..2c09c80 --- /dev/null +++ b/.local/bin/dmenuunicode @@ -0,0 +1,20 @@ +#!/bin/sh + +# The famous "get a menu of emojis to copy" script. + +# Get user selection via mew from emoji file. +chosen=$(cut -d ';' -f1 ~/.local/share/larbs/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 -- cgit v1.2.3