"...there is still a lot of boilerplate involved in writing a compositor, much more than for an X11 window manager, namely setting up your own rendering code, registering and storing input devices and screens in your own data structures, passing input events to windows, calculating bounds for bars and other overlays (courtesy of layer-shell) and others. X11 handles all of this for you..."
https://tudorr.ro/blog/technical/2021/01/26/the-wayland-expe...
<edit> Several people mentioning wlroots. I can't say I've ever attempted it myself, but if you take a look at the blog post above, the author is very clear on the fact that even with the benefit of wlroots (which they highly praise) writing a Wayland compositor is still a lot more work than writing an X11 window manager (which they have also done, so they are something of an authority). wlroots doesn't abstract everything away, it just gives you a bunch of useful tools.
"With Wayland, you handle everything, even with wlroots."
It is hard to quantify how much buggy, or less buggy, are "amateur" Wayland compositors compared to their X11 counterparts. While it is true that a Wayland compositor programmer has to code by hand a lot of boilerplate as I explained in the article, now that the absolute ugliest yet-still-essential parts have been abstracted away in the scene graph API (before, if you didn't implement damage tracking, you had to basically say goodbye to your laptop's battery), besides the other ugly yet-still-essential parts that are already the entirety of wlroots, now compositor writers have the sweet-spot where they can integrate the special behaviour their compositor is all about with nicer graphics, rendering, input handling etc. IMO, this actually leaves room for less bugs, and all around a much better, and stable, experience, than what one would get with an X11 WM + a X11 compositor on top.
And, looking at this compositor, Hyprland, it looks like just that. It's a nice dynamic tiling compositor, but it also has some very slick graphics, animations, config system. Looks like nothing I've seen before in the ricing space. And by quickly looking through its source code, it looks like it benefited massively from wlroots and from the scene graph API, plus all the other Wayland protocol extensions that are implemented ready-to-use in wlroots. Great work from the community!
[0] There was a subtle mechanism-not-policy error where they made screenshots impossible without some back-channel being available. In hindsight, there should have been mechanisms for sharing buffers at the protocol level. "Can't share" turned out to be a forced policy, and the wrong one.
And because screenshots are a privileged operation, this will always need to go through a back-channel anyway to handle the security aspect. Otherwise you'll end up with a repeat of X11 again where any Wayland client connected to the server can scrape the screen at all times. So for desktop use there's really no reason to ever put it in a Wayland protocol. The design from the beginning was to keep privileged operations (like screenshots and input grabs) out and that still holds true now.
That comparison is a bad one to make. Compared to just a window manager, that's correct. But you have to compare Wayland compositors to X11 compositors and for that it's about the same amount of work. Either one expects you to bring your own rendering because that's the main benefit of writing a compositor.
It also might make sense to compare X11 window managers to compositor plugins. The reason people seem to prefer wlroots is precisely because it offers more power and more control over the just writing a window manager.
The observable effect of this is that the long tail of niche projects like X11 window managers, custom toolkits or small applications (that don't carry around extremely heavy dependencies like GTK/Qt) gets decimated. The assumption that this is done on purpose is plausible.
Shoutout for Cardboard, an awesome Wayland compositor and a rare example of Scrolling Tiling window management.
eg. wlroots
And frankly, for putting together a window manager the proper choice of action is extending an already existing compositor.
If you speak about a probably working one instead of a toy one the difference between X11 and wlroots isn't that big AFIK.
It's just that with X11 you could create a toy compositor with very little lines of code and that's not possible anymore.
But then toy compositors also kinda don't matter in the grater picture so it's not really a problem.
One of the first things I do on a new device is to disable animations and similar "eye candy". On Gnome it's hidden, but can be changed with gnome-tweek-tools ; on Android it's hidden too, in the developer options that you have to unlock (7 taps on build number).
In both cases, those animations easily lose frames and are distracting, without talking about the frivolous power spending on portable devices, but they are enabled by default and not easily removed.
It bugs me to jo end that wrong priorities seem to apparently be the norm.
I don't remember which extension I use to work around that; maybe this one: https://extensions.gnome.org/extension/1317/alt-tab-switcher...
Having a compositor that does desktop zoom is very nice too, although not quite in the same class of features as those eyecandy animations. Frustratingly, Kwin won't let you set a mousewheel keybind for this zoom effect, a senseless limitation. You can get around this with xbindkeys though, using config like this:
"qdbus6 org.kde.kglobalaccel /component/kwin invokeShortcut view_zoom_in"
Mod4 + Super_L + b:4
"qdbus6 org.kde.kglobalaccel /component/kwin invokeShortcut view_zoom_out"
Mod4 + Super_L + b:5
I have no clue how you'd fix this if you're using Kwin/Wayland..1: https://macos-defaults.com/dock/mineffect.html#set-to-genie-...
Have you ever heard of Phoenix? https://github.com/kasper/phoenix/. Despite googling around for this exact topic, with 3.8k stars I had never heard of it. Apparently someone has created slim, JS scriptable interface that is basically tailor made toward creating your own tiling WM. I just installed it and loaded one of the examples: https://github.com/nik3daz/spin2win. And what it does is basically ignores the built-in spaces and creates truly virtual desktops by just hiding and resizing windows. And it works pretty well. The response time between switching "desktops" is basically instant.
However I'm not sure Swish solves the big benefit of i3/bspwm for me, which is the lightning-quick virtual desktop and "send to desktop" functionality of a tiling WM on linux. Having two apps open side by side is useful, but not quite as useful as having two apps open full screen on virtual desktops 1 and 2, and the switch between them being totally instantaneous.
> Arch, NixOS and openSUSE Tumbleweed are very supported. For any other distro (not based on Arch/Nix) you might have varying amounts of success. However, since Hyprland is extremely bleeding-edge, distros like Pop!_OS, Ubuntu, etc. might have major issues running Hyprland.
and
> This project is under development and is constantly changing.
It’s not practical to expect that they will support every distro from the get-go, when they are actively developing it.
Hyperland's wiki only lists "Dwindle" and "Master" layouts, which from the description are strictly less versatile than i3 (and Sway?) in exchange for convenience if those layouts are what you want. Does it even have something as flexible as i3? (and Sway?)
That alone is interesting enough to get me to look at switching..
Just so that I know beforehand, can transparency, gaps, animation be turned off?