From 1682691d00ce85a63fca32455153f4bfd855553f Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Tue, 9 Apr 2019 16:17:17 +0200 Subject: Created emoji.sh to search and copy an emoji. --- emoji.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 emoji.sh (limited to 'emoji.sh') diff --git a/emoji.sh b/emoji.sh new file mode 100755 index 0000000..6cc6ca5 --- /dev/null +++ b/emoji.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Feeds an emoji list into dmenu and allows to select one into clipboard + +file="$XDG_CONFIG_HOME/emoji" +selected="$(cat "$file" | dmenu -i -l 20 -p "Choose an emoji:" | cut -d' ' -f1)" +[ -z "$selected" ] && dunstify "No emoji selected." && exit 0 +echo "$selected" | xsel -ib +dunstify "Copied $(xsel -ob)" -- cgit v1.2.1