Let’s continue the Sway window manager (in Arch Linux) series I started inmy previous post.
In this post, we deal with system notifications. (This post is similar to thecorresponding one about Hyprland.)
We usemako, a lightweight notification daemon for Wayland, one of the optional softwaresuggested when we installed Sway. We also need “inotify-tools”:
1 | sudopacman-Sinotify-toolsmako |
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:
1 | notify-send"hello" |
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:
1 2 3 4 5 6 7 8 9 10 11 12 | man 5 mako NAME mako - configuration file DESCRIPTION The config file is located at <strong>~/.config/mako/config</strong> or at $XDG_CON‐ FIG_HOME/mako/config. Option lines can be specified to configure mako like so: key=value Empty lines and lines that begin with # are ignored. |
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:
1 | killallmako |
or
1 | makoctlreload |
With that example configuration, we can emit a few notifications with different “urgencies”, and see the different colors and positions of the boxes:
1 2 3 4 5 6 7 | notify-send-ulow"hello world\!""This is a low urgency message" notify-send-unormal"hello world\!""This is a normal message" notify-send-ucritical\ "This is a critical message\!"\ "OK, that was just a demo ;)" |
If you useEndeavourOS, 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.



Pingback:Sway in Arch Linux: other configurations | Lorenzo Bettini