diff options
author | awy <awy@awy.one> | 2025-07-29 03:42:18 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2025-07-29 03:42:18 +0300 |
commit | ef6dff4cce15186a66ba34cdd7bd39958ebf7f58 (patch) | |
tree | fcfa61164ca6e79c900b5d11f6afc6b46aaccb84 /.local/bin/dmenuunicode | |
download | hyprdots-ef6dff4cce15186a66ba34cdd7bd39958ebf7f58.tar.gz |
first commit
Diffstat (limited to '.local/bin/dmenuunicode')
-rwxr-xr-x | .local/bin/dmenuunicode | 20 |
1 files changed, 20 insertions, 0 deletions
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 |