#!/bin/sh

# The famous "get a menu of emojis to copy" script, ported to tofi (wayland).

# Get user selection via tofi from emoji file.
chosen=$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d | sed "s/ .*//")

# Exit if none chosen.
[ -z "$chosen" ] && exit

printf "%s" "$chosen" | wl-copy
notify-send "'$chosen' copied to clipboard." &
