getimiskon's space

Wayland compositors are a mess

Posted in 2023-11-05

For quite some time I have developed an interest towards Wayland, the protocol that is going to eventually replace the decades-old X server. I have been testing different compositors for the last few months, and so far I'm not fully satisfied by any of these that are currently available, at least on my distribution's repositories.

I have been a user of dwm since early 2020 and since 2021 I've started using it exclusively, maintaining a patched version of it and even contributing fixes on patches when I consider it's needed. I'm used to how it works and the workflow of it feels just right to me. So if I want to try a Wayland compositor, the choice that would make sense to me would be dwl, right? Well, it's not that easy.

From my experience, dwl lacked quite a few features that are actually useful to me, like the embedded bar. Like dwm, dwl is trying to keep it's source code as small as possible. I agree with this idea, but it can become an issue when useful features aren't present. For example, in order to make the bar work, I needed to set up a patch to enable IPC, that I could never compile.

Trying other Wayland window managers was similarly somewhat of a pain in the ass to me. The compositor I had the most luck with is Sway, which is a clone of i3. I generally don't like i3, but the framework it's based on, wlroots, is interesting. Another window manager I tried using recently is labwc, a clone of Openbox. The problem is that none of these worked like I wanted to. I encountered some problems that felt like breaking the whole experience for me.

So, what I can do in my case? In my opinion, dwl could be a good starting point for making a window manager that works fine for me, but making significant changes will be necessary, in order to get a user experience closer to dwm's. For example, support for IPC without the need of patching the source code would be useful to make external bars function similarly to dwm. But I think I could do things beyond that. For example, I would like to avoid recompiling the code every time I want to do changes on the configuration of the window manager. Also a better floating mode would be nicer, as well as having the desktop menu from labwc.

You may ask, why not using Hyprland? Well, unless you run Arch, it seems it won't work. That's how it seems. I tried compiling from source, nothing. Void Linux doesn't have that in its repos, because Hyprland doesn't build against tagged wlroots. To be honest, this choice doesn't make sense to me. It makes compiling that window manager a huge pain in the ass. Actually looking at Hyprland's "supported" distros, only Arch and Nix are listed as officially supported. I can't take Hyprland seriously, at least as it currently is. I hope it will change in the future, because the project seems promising.

So the best option for me right now is to start building my own thing. I haven't worked in a project like that before, but it seems like an interesting challenge. I have recently started experimenting with tinywl, a very basic implementation of a compositor based on wlroots. Unfortunately, I can't compile it with the version of wlroots on my system. So I have to try something else. Maybe dwl's source code will help me with that. As I wrote in the title, Wayland compositors are a mess.

Thanks for reading.