others/emojis.sh

25 lines
608 B
Bash
Raw Normal View History

2023-04-16 06:08:08 +02:00
#!/bin/sh
2023-03-27 05:27:33 +02:00
2024-01-21 04:09:33 +01:00
# emojis file path.
EMJ="$HOME/.emojis"
2024-01-25 14:51:10 +01:00
# check if runing inside a terminal.
if [ -t 0 ]; then
# pull up the file with fzfmenu and store in a termporary file.
2023-08-22 07:17:58 +02:00
MENU=fzfmenu.sh
2024-01-25 14:51:10 +01:00
$MENU < $EMJ | cut -d ' ' -f 3- > /tmp/emoji
else
2023-08-22 07:17:58 +02:00
# pull up the file with fzfmenu.sh and store in a temporary file
2024-01-25 14:51:10 +01:00
MENU=wms_menu.sh
$MENU < $EMJ | cut -d ' ' -f 3- | xclip
# to paste somewhere else other than an X application.
xclip -o | xclip -sel c
2023-08-22 07:17:58 +02:00
fi
2023-03-27 05:27:33 +02:00
2023-04-16 06:08:08 +02:00
## .emojis file example:
2023-08-22 07:17:58 +02:00
# acid ⊂(◉‿◉)つ
# afraid (ㆆ_ㆆ)
# angel ☜(⌒▽⌒)☞
# angry x (•`_´•)