Create a emoji selection script

This commit is contained in:
foo-dogsquared 2020-01-20 17:18:40 +08:00
parent a9907709be
commit b5b3c25c28
2 changed files with 17 additions and 1 deletions

13
bin/choose-emoji Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
# Downloads the official emoji list from http://www.unicode.org/Public/emoji/latest/emoji-test.txt and create a selection to clipboard with rofi.
# 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
awk 'match($0, /([0-9A-F ]+)\s+; fully-qualified\s+# (\S+) E[[:digit:]]+.[[:digit:]]+ (.+)$/, a){print a[2], a[3]}' ~/.local/share/emoji-test.txt | rofi -dmenu -p "Choose an emoji to copy." -theme fds-sidebar-dark | awk '{print $1}' | xclip -selection clipboard && notify-send "'$(xclip -o -selection clipboard)' has been copied to clipboard."

View File

@ -52,7 +52,10 @@ super + shift + d
$HOME/bin/rofi-user-action-menu.sh
super + shift + m
man -k . | rofi -dmenu -p "Select the manual entry" -theme fds-sidebar-dark | awk '{print $1}' | xargs -r man
~/bin/choose-manual --viewpdf
super + shift + e
~/bin/choose-emoji
# Reloads the Simple X Hotkey Daemon config and Polybar.
shift + super + r