DEV Community

Cover image for Create a emoji-picker in dmenu
Awal Ariansyah
Awal Ariansyah

Posted on


Create a emoji-picker in dmenu

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:

I'm assuming you're already installed dmenu on your system.

Get all the emoji

mkdir ~/dmenu
cd dmenu

curl | sh
Enter fullscreen mode Exit fullscreen mode

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.

Image description

Make the script

chmod +x
Enter fullscreen mode Exit fullscreen mode

We created a file, open it with your favorite editor.

Paste the script by Luke Smith below.


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!"
Enter fullscreen mode Exit fullscreen mode

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:

Image description

My final script:

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;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git