aboutsummaryrefslogtreecommitdiff
path: root/emoji.sh
diff options
context:
space:
mode:
Diffstat (limited to 'emoji.sh')
-rwxr-xr-xemoji.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/emoji.sh b/emoji.sh
index 99a69a1..57cde73 100755
--- a/emoji.sh
+++ b/emoji.sh
@@ -3,7 +3,7 @@
# Feeds an emoji list into dmenu and allows to select one into clipboard
file="$XDG_CONFIG_HOME/emoji"
-selected="$(dmenu -i -l 20 -p "Choose an emoji:" < "$file" | cut -d' ' -f1 | tr -d '\n')"
+selected="$(dmenu -i -l 20 -p "Choose an emoji:" < "$file" | cut -d' ' -f1)"
[ -z "$selected" ] && dunstify -t 2000 "No emoji selected." && exit 0
-echo "$selected" | xsel -ib
+echo "$selected" | tr -d '\n' | xsel -ib
dunstify -t 2000 "Copied $(xsel -ob)"