Monthly Archives:March 2026

Run mako in Sway/Hyprland, but not in KDE (Wayland)

If you use aWaylandcompositor likeSwayorHyprland,makois a great lightweight notification daemon. Many distros make it “start automatically” via asystemd user service, so you don’t need to addexec makoto your compositor config.

I’m experimenting with a setup with KDE, Sway, and Hyprland installed on the same machine and used by the same user, and there’s a catch:KDEon Wayland is also a Wayland session, so the same auto-start logic can kick in there too — and you end up with mako running in Plasma when you don’t want it.

This post shows a clean fix:keep mako auto-starting in Sway/Hyprland, but skip it in KDE, using asystemd drop-in overridethat lives nicely in your dotfiles (e.g., with chezmoi).


Why mako starts in KDE

On many systems, the provided user unit checks only whether you’re ina Wayland session:

KDE Wayland setsWAYLAND_DISPLAYtoo, so mako passes the check and runs.


The fix: restrict the systemd unit to Sway/Hyprland

Create a systemd user drop-in:

This opens an editor and writes a file under:

  • ~/.config/systemd/user/mako.service.d/override.conf

Put this in that file:

Apply it:

Now mako should start in Sway/Hyprland, and be skipped in KDE.


Verify what systemd is using

To see the merged unit (vendor file + your override):

To confirm whether it’s running and why:

If you log into KDE and it’s skipped, you’ll typically see a reason related to theExecCondition.


Making it portable with chezmoi

Sincesystemctl --user editproduces a file in your home directory, it’s perfect for dotfiles.

Withchezmoi, just track:

  • ~/.config/systemd/user/mako.service.d/override.conf

On another machine, once mako is installed, that drop-in will be picked up automatically. The only thing to remember is thatsystemd reads unit changes after a reload(or next login), so if you want it to take effect immediately afterchezmoi apply, run:

(try-restartis nice because it won’t error if mako isn’t running.)


Bonus note: D-Bus activation

Depending on your distro and setup, mako can also be started via D-Bus when a request for notifications is made. If you find mako still appears in KDE even when the unit is skipped, check whether it’s being D-Bus activated — and then either:
– rely on a KDE-native notification daemon in Plasma, or
– mask the D-Bus service fororg.freedesktop.Notificationsfor KDE sessions only.

(Usually, the systemd drop-in above is enough.)