Logo

dev-resources.site

for different kinds of informations.

Create a emoji-picker in dmenu

Published at
1/9/2023
Categories
linux
dmenu
xfce
emoji
Author
awalariansyah
Categories
4 categories in total
linux
open
dmenu
open
xfce
open
emoji
open
Author
13 person written this
awalariansyah
open
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: 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
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

touch dmenuemoji.sh
chmod +x dmenuemoji.sh
Enter fullscreen mode Exit fullscreen mode

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!"
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:

#!/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
Enter fullscreen mode Exit fullscreen mode
emoji Article's
30 articles in total
Favicon
Boost Communication on Slack, Discord, GitHub, and Beyond! /BUTIFULL EMOJIS
Favicon
🍳 Emoji Kitchen Game: Create Fun Emoji Combos! (Open Source Project) 🚀
Favicon
Unicode, Emojis, and a bit of Golang
Favicon
🤪 Emojify Text Bookmarklet
Favicon
My First NuGet Package: EmojiToText
Favicon
New Emojis
Favicon
Diversifying Emojis With AI
Favicon
Emojify
Favicon
Biblioteca emoji-picker-element em português
Favicon
How to apply a skin tone to an emoji? 🧛🧛🏻🧛🏼🧛🏽🧛🏾🧛🏿
Favicon
A simple emojis todo app built with Next.js
Favicon
Design Custom Cart Emoji Online with Simplified Emoji Maker
Favicon
Tailwindcss version of Looms's beautiful Emoji Toolbar React component
Favicon
Code Meets Creativity: Crafting Emoji Names with Python
Favicon
Animated emojis for React apps
Favicon
Seamless emoji creation on Discord with bots and Vercel
Favicon
En Popüler Emoji Anlamları ve Kullanımı
Favicon
Fluent UI and Emoji used in Microsoft Teams
Favicon
EventBridge Emoji Event Patterns
Favicon
The Ultimate Emoji Cheat Sheet for Developers
Favicon
Emoji string lengths
Favicon
#LearnedToday: Compound Emoji 👨‍💻
Favicon
How to use Emojis in a Python + Django + MySQL project
Favicon
How to handle emojis in Nodejs
Favicon
Turbocharge Your Rocket.Chat with Bulk Emoji Uploads: Introducing the Ultimate Emoji Management Tool
Favicon
Length of a string
Favicon
Emojis in Development?
Favicon
Create a emoji-picker in dmenu
Favicon
st - the suckless simple terminal, v0.9
Favicon
What are your favourite emoji to use in build pipelines?

Featured ones: