[bin] Add shell based emoji picker

Inspired by @biox' https://github.com/biox/shmoji/blob/main/shmoji
This commit is contained in:
Sebastian Schulze 2023-05-09 19:28:54 +02:00
parent bdb846a9b3
commit 8640abd416
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# Shell based emoji picker
# Inspired by https://github.com/biox/shmoji/blob/main/shmoji
#
SWAYSOCK="/run/user/1000/sway-ipc.sock"
export SWAYSOCK
set -eo pipefail
set -xv
EMOJI_FILE=$(readlink -f ~/.local/share/emojis.txt)
if [ ! -f "${EMOJI_FILE}" ]; then
curl -os "${EMOJI_FILE}" "https://trash.j3s.sh/emojis.txt"
fi;
EMOJI=$(fzf < "${EMOJI_FILE}" | cut -d " " -f 1 | tr -d '\n' | tee wl-copy)
notify-send "${EMOJI} Copied to clipboard." -t 1200 --icon=edit-copy-symbolic

View File

@ -58,6 +58,11 @@ then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/iqalc
elif [[ "$1" == "emoji" ]]
then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🐈 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-emoji
elif [[ "$1" == "alfaview-room" ]]
then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"