[bin] Add shell based emoji picker
Inspired by @biox' https://github.com/biox/shmoji/blob/main/shmoji
This commit is contained in:
parent
bdb846a9b3
commit
8640abd416
|
@ -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
|
|
@ -58,6 +58,11 @@ then
|
||||||
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||||
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
|
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
|
||||||
COMMAND=~/bin/iqalc
|
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" ]]
|
elif [[ "$1" == "alfaview-room" ]]
|
||||||
then
|
then
|
||||||
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
|
||||||
|
|
Loading…
Reference in New Issue