others/emojis.sh

28 lines
609 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-17 06:20:45 +01:00
# check display.
2023-08-22 07:17:58 +02:00
if [ -n "$DISPLAY" ]; then
2024-01-17 06:20:45 +01:00
MENU=wms_menu.sh
2023-08-22 07:17:58 +02:00
# pull up the file with dmenu and pipe into xclip to be copied into the clipboard
2024-01-21 04:09:33 +01:00
$MENU < $EMJ | cut -d ' ' -f 3- | xclip
2023-03-27 05:27:33 +02:00
2023-08-22 07:17:58 +02:00
# To paste somewhere else other than an X application
xclip -o | xclip -sel c
else
MENU=fzfmenu.sh
# pull up the file with fzfmenu.sh and store in a temporary file
2024-01-21 04:09:33 +01:00
$MENU < $EMJ | cut -d ' ' -f 3- > /tmp/emoji.txt
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 (•`_´•)