One of the nice things I have in Windows is that when I pressed windows
+ .
, the emoji picker shows up. When I moved to linux distros as a daily driver, I kinda missed that features.
You can use others packages or use IBus, but I would like some cleaner approach. This approach is presented by Luke Smith, check out his cool youtube: https://www.youtube.com/watch?v=UCEXY46t3OA.
I'm assuming you're already installed dmenu on your system.
Get all the emoji
mkdir ~/dmenu
cd dmenu
curl https://gist.githubusercontent.com/Caellian/947e9b7b0f9d42278b9308765dc4ec08/raw/66a8b264732b4da40970cb3c57df02118e47cb2b/update.sh | sh
We make a directory and then use this nice script by Caellian to collect all available emojis and format it.
You'll see a file named "emoji_list". That's the file we're going to insert into dmenu.
Make the script
touch dmenuemoji.sh
chmod +x dmenuemoji.sh
We created a file dmenuemoji.sh
, open it with your favorite editor.
Paste the script by Luke Smith below.
#!/bin/sh
grep -v "#" emoji_list | dmenu -i -l 20 | awk '{print $1}' | tr -d '\n' | xclip -selection clipboard
pgrep -x dunst >/dev/null && notify-send "$(xclip -o -selection clipboard) Copied!"
Don't forget to bind it with a keyboard shortcut.
You can edit the script, for example your preferred dmenu layout or your clipboard app. Here's my final result:
My final script:
#!/bin/sh
grep -v "#" emoji_list | dmenu -c -i -l 15 | awk '{print $1}' | tr -d '\n' | xclip -selection clipboard;
if [ -n "$(xclip -o -selection clipboard)" ]; then
notify-send "Emoji copied" "$(xclip -o -selection clipboard) successfully copied!" --icon=dialog-information;
fi
Top comments (0)