aboutsummaryrefslogtreecommitdiff
path: root/emoji.sh
diff options
context:
space:
mode:
Diffstat (limited to 'emoji.sh')
-rwxr-xr-xemoji.sh9
1 files changed, 9 insertions, 0 deletions
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)"