2020-01-20 09:18:40 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2020-03-25 16:41:57 +00:00
|
|
|
# Simply create a universal emoji selection list.
|
2020-01-20 09:18:40 +00:00
|
|
|
|
|
|
|
# Dependencies:
|
|
|
|
# * mktemp - GNU coreutils 8.31
|
|
|
|
# * wget - GNU Wget 1.20.3 built on linux-gnu
|
|
|
|
# * sed - GNU sed 4.8
|
|
|
|
# * awk - GNU Awk 5.0.1
|
|
|
|
# * rofi - Version: 1.5.4
|
|
|
|
# * xclip - version 0.13
|
|
|
|
|
2020-04-29 15:58:14 +00:00
|
|
|
emoji_file='~/.local/share/emoji-test.txt'
|
|
|
|
selection=$(awk 'match($0, /([0-9A-F ]+)\s+; fully-qualified\s+# (\S+) E[[:digit:]]+.[[:digit:]]+ (.+)$/, a){print a[2], a[3]}' ~/emojis.txt | rofi -dmenu -p "Choose an emoji to copy." -theme fds-sidebar-dark | awk '{print $1}')
|
2020-03-25 16:41:57 +00:00
|
|
|
|
2020-04-29 15:58:14 +00:00
|
|
|
if [ -n "$selection" ]; then
|
|
|
|
printf "$selection" | xclip -selection clipboard && notify-send "'$(xclip -o -selection clipboard)' has been copied to clipboard."
|
2020-03-25 16:41:57 +00:00
|
|
|
fi
|
|
|
|
|