Emoji Support in Dunst

TL;DR

  • Install an emoji font
  • Restart Dunst
  • Optional: explicitly configure ~/.config/dunst/dunstrc to include the font

A little more context

Although I've used Dunst for a couple of years, it wasn't until recently that I realised I wanted emoji support.

It came about when I switched over from Chromium to Firefox Nightly, and found that the WhatsApp Web interface would send notifications via Dunst. For instance, I would receive a popup similar to:

Dunst notifications without emoji support, showing the raw Unicode characters instead of pictogram representation

As you can see, instead of receiving a pictogram representing "Woman Gesturing OK", I was able to see the raw Unicode representation.

It turns out the lack of emojis showing was due to me not having any emoji fonts installed on my system. Following the Fonts page on the Arch Wiki I found that as I liked Google's emoji, and they were packaged nicely, I would use them.

Once installed, I found that the font would automagically get loaded into Dunst and would render notifications correctly:

Dunst notifications with emoji support, showing the correct pictogram representation

Just to ensure this would always reference this font (i.e. in the case multiple emoji fonts were installed), I configured Dunst by adding the following configuration in ~/.config/dunst/dunstrc:

 [global]
-    font = Liberation Mono
+    font = Liberation Mono, Noto Emoji 12

To determine the font name to use, I ran the following command, and noted the name between the colons:

$ fc-list | grep -i noto
/usr/share/fonts/noto/NotoEmoji-Regular.ttf: Noto Emoji:style=Regular
/usr/share/fonts/noto/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular
$ fc-list | grep -i noto | cut -f2 -d: | cut -c2-
Noto Emoji
Noto Color Emoji

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#arch-linux #dunst #dotfiles #blogumentation #emoji.

This post was filed under articles.

Has this content helped you? Please consider supporting me so I can continue to create content like this!

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.