Sway WM: Notifications with Mako

Let’s continue the Sway window manager (in Arch Linux) series I started in my previous post.

In this post, we deal with system notifications. (This post is similar to the corresponding one about Hyprland.)

We use mako, a lightweight notification daemon for Wayland, one of the optional software suggested when we installed Sway. We also need “inotify-tools”:

The nice thing about mako is that you don’t need to start it manually as a service: the first time a notification is emitted, mako will run automatically.

Let’s try to run the notification command:

We see the pop-up in the screen’s top right corner by default.

You can have a look at mako’s manual (5) about its configuration file and where it is searched for:

An example configuration, usable as a starting point, can be found here: https://github.com/emersion/mako/wiki/Example-configuration.

Each time you modify the configuration, you must reload mako by using one of the following commands:

or

With that example configuration, we can emit a few notifications with different “urgencies”, and see the different colors and positions of the boxes:

If you use EndeavourOS, you will get notifications about new updates and when a reboot is required after a system update (the latter is a “critical” notification):

That’s all for this post!

Stay tuned for another post about Sway WM.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.