The problem with "alternative" Wayland compositors is that so much more functionality is pushed into the compositor under the Wayland architecture compared to window managers on X11. So it's a ton more work to write a Wayland compositor than an X11 window manager, and most of it is tedious boilerplate that almost certainly has nothing to do with your motivation for writing a new compositor in the first place. This in turn affords many more opportunities to introduce bugs, missing functionality etc. I trust "weird" compositors much less than I trust "weird" X11 window managers - it's more like using an alternative Xorg than an alternative WM.
"...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..."
<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."
I'm the author of the mentioned blog post. The situation changed a little bit since I published the post, which is that wlroots finally gained upstream the scene graph API, which abstracts away a lot of the painful parts of compositor development, mostly the parts about rendering windows and damage tracking.
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!
There were some mis-steps with Wayland being too light [0] - but we're entering an exciting new era where people start experimenting in the graphics space again. wlroots might be enough, or there might be a few attempts to get the supporting libraries right. But it'll be solved in time.
[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.
No, that wasn't a mis-step and it wasn't the wrong policy. Wayland is primarily concerned with taking buffers and telling the GPU to put them on the screen. Buffer sharing between clients is more concerned with the opposite: taking GPU buffers and turning them back into CPU-readable pixels so software can do arbitrary processing on them. Those are two very different concerns.
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.
Like many other things (including, originally, copy-paste), you were supposed to use your desktop environment's support for this over to-be-specified D-Bus API
On the other hand, there is nothing in Wayland that prevents anyone from writing a compositor that splits off some window management tasks to a separate process. Afaik nobody has bothered to do so yet, but if there is demand then it could be done. Or maybe there isn't that much demand for such thing.
The blog post mentions Wayfire, which has a plugin architecture, so not separate processes but an abstraction boundary at least - which is the more important thing.
>The problem with "alternative" Wayland compositors is that so much more functionality is pushed into the compositor under the Wayland architecture compared to window managers on X11.
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.
It's not a bad comparison to make when people are writing entire new compositors just to provide, say, a tiling experience - exactly the way they used to write window managers. I understand you're trying to be "fair" to Wayland here but the fact is there is a lack of an abstraction boundary where there used to be one. Maybe that abstraction boundary can be reinstated by a well-written compositor with a plugin architecture, but that isn't standard the way the window manager interface is (unless you can persuade everyone to use that one compositor).
> "With Wayland, you handle everything, even with wlroots."
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.
Plausible, but not realistic or actually happening, because there's nothing at the protocol level that prevents the long tail of small compositors, toolkits or applications from implementing a Wayland backend.
The LXQt project, that has a Wayland branch (sometimes called LWQt) actually uses mutter (the GNOME compositor) and --at this point-- not KWin to for its compositing needs.
An X11 window manager is more akin to a gnome extension than a proper window manager. Just because writing such a plugin is easy shouldn’t make our expectations all that different.
And frankly, for putting together a window manager the proper choice of action is extending an already existing compositor.
I've never liked animations in interfaces like this. It was fun to play with when Compiz was new, but it doesn't make the tool any more useful or pleasant for me to use. At least it's not as bad as the OSX "magic lamp" minimize.
I'm not a fan of animations myself, though I think it could be somewhat useful with a tiling WM to help maintain (for lack if a better word) your orientation. Sometimes a new window will open and move the other windows around and get resized unexpectedly, or you'll move a window and lose track for a split second. Animation would show you where everything gets put so you don't have to reorient yourself. Not a very common issue, but I could see animation helping there.
Yeah they can be helpful in such cases. I used Gnome for a while and although I liked the overview animation, it was too slow for my taste and you needed an extension to speed it up, so I just disabled them. I see that Hyprland allows you to configure this OOTB though.
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 like gsettings. You can just put the calls in a script once and call it whenever needed. You can access everything from there. You can search for relevant keys from the terminal or with dconf editor.
Personally a huge fan of the animation showcase, I'd be willing to take a latency hit because I find it much easier to keep track of. Obviously I overcame any such issues in order to get use standard TWMs, which I do just fine, so idk if I'd still appreciate how they feel interactively? But I'm glad to see the amount of customization available within them, maybe I'd just speed them up or otherwise adjust the curves.
I also see no problem with animations, but they should be “interactive” as in ios app switch gesture — that is, they should be as fast as the movement itself, and should be reversible, etc.
I dislike almost all desktop animations, except for sliding between virtual desktops, and an animated zoom-out to view all desktops. Particularly the first; having an animated slide between virtual desktops really helps me form a spatial feeling for where windows on different desktops are. But miss me with animated minimizing (magic lamp is the worst!), wobbly windows, etc. That sort of eyecandy is very distracting, I used it for a few days when I first tried Beryl, but never since.
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:
For anyone like me who uses macOS and also dislikes the genie minimize effect, you can change it[1] and/or change/turn off a huge variety of animations[2].
With high refresh rate displays, Im excited to see what 0.3s duration animations look like. I have hopes a small dose of fluidity inside the fast, snappy tiled experience can add some understandability, provide some good context, while not slowing down the flow. Not, like, in compiz, making really slow navigation systems, just adding some continuity to current paradigms.
I sorely miss tiling WMs when I use MacOS; Amethyst and yabai just seem to big out all the time, lose track of windows, get confused by native tabs, and deal poorly with windows that force maximum/minimum sizes. I've concluded that MacOS's window model just really doesn't mesh with tiling.
My current solution, after much experimentation with tools like Rectangle, Hookshot, and Spectacle, is to use Swish[1]. It feels sort of like an inside-out version of how I use Sway on linux. With Sway each window that I open is tiled onto the current desktop, then I re-balance the split or reposition the window with my mouse, and set the window to float if it doesn't cooperate.
With Swish each window opens as floating, but by swiping on its title bar I can tile it into whatever position I want. This defaulting to floating works better on MacOS where the frequency of uncooperative windows is much higher than on linux. The killer feature of Swish for me is that it keeps track of the grid you make by swiping windows into place and maintains it even when you resize or reposition windows relative to one another, much like i3/sway.
It's still quite frustrating though that I have to pay $16 for an app to make window management bearable. This is a basic OS feature that I've come to take for granted.
Actually, if you're interested at all, I just, after literally months of reading about this, found a pretty sick solution.
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.
I've been using MacOS for awhile and this is likewise my one true gripe. I've played around with amethyst and yabai and also find them just a little too shaky to rely on. I miss the rock solid nature of i3/bspwm. And trying to script my own functionality with Hammerspoon or BTT has been an exercise in frustration. I'll give Swish a shot with this recommendation.
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.
It's a shame that they refuse to use a versioned release of wlroots. It makes packaging this needlessly difficult (or impossible, depending on distribution policy).
> 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.
It uses dynamic tiling rather than static tiling meaning more versatility how specific desktops get arranged such as bsp, tree, or even custom arrangements
I thought Sway was based on i3, which is an arbitrary-width tree that can have different display modes per container node in the tree.
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?)
I'm just giving this a try and with xdg-desktop-portal-hyprland (their fork of the wlr portal) I get perfect screensharing in Google Meet using pure Wayland.
That alone is interesting enough to get me to look at switching..
This looks beautiful and it's in AUR, so I'm definitely going to try this tomorrow. I've been shopping for a replacement for GNOME because they keep removing features I'm in the middle of my using which is really stressful and I just can't trust them anymore.
"...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.
https://gitlab.com/cardboardwm/cardboard
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:
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-...
2: https://apple.stackexchange.com/a/63477
Deleted Comment
1: https://highlyopinionated.co/swish/
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..