Live data from Hacker News

Mwm – The smallest usable X11 window manager

github.com

61–70 of 96 posts

Re: Mwm – The smallest usable X11 window manager

#61
post #42
post #29

Earlier quoted context omitted.

YAGN more experimental/niche window managers. Windows and macOS get by fine on one apiece, in fact their desktop story is better because their WM and toolkit is standardized. The developers of Wayland (who are identical to the developers of Xorg) aspire to more of a Windows/Mac-like ecosystem for Linux, in which standardization, performance, and support for modern graphics hardware without hacks or workarounds are pr…

Terrible window management is a huge reason I will not use Mac OS or Windows. I immediately lose so much productivity. I am coming up on my 30th year of using Linux, and I can't imagine moving to an OS with such limited window capabilities. No sloppy mouse focus? No always on top? No sticky windows? No marking windows as utility windows to skip alt-tab? I watch my colleagues on Mac OS and Windows during peer programm…

I have to use BetterTouchTool to make OSX usable. With BTT, OSX is awesome though. Much better than Windows.

Modern OSX does have always-on-top natively now btw.

Re: Mwm – The smallest usable X11 window manager

#62

I wish things were as easy as they were with X11. Being able to ssh into a box and “export DISPLAY=192.168.0.7:0.0” then start an app and have it show up locally is just magical.

This still works if X11 is installed on the remote. I have a remote that runs Wayland locally, and I run Wayland in the client machine as well, but I have X11 installed on the remote and X11 forwarding still works, it just opens the remote application in an XWayland window inside the local Wayland session. No biggie

For now

Re: Mwm – The smallest usable X11 window manager

#63
post #33

Earlier quoted context omitted.

True; but a counterargument is that the _display protocol_ is not the right abstraction layer for decoupling window management from the display server. There is nothing stopping someone from writing a batteries-included wlroots-like library where the only piece you need to write is the window management and input handling, or even an entire Wayland compositor that farms these pieces out to an embedded scripting runti…

Copy&paste between apps should work just fine using this window manager. I have not tried mwm but use my own 100 line C window manager and I can copy and paste without issue. Wayland will take 20 more years before it can dethrone X11. And even then we will mostly run X11 apps on XWayland.

> Wayland will take 20 more years before it can dethrone X11. And even then we will mostly run X11 apps on XWayland.

And yet RedHat/Fedora and Ubuntu, as well as GNOME, are leading the charge to drop X support in the next release; KDE as of V7. It may take 20 years for Wayland to match X's capabilities, but it looks like the guillotine has already been rolled out.

A more conspiratorial person than I could be led to think that RedHat is actively working against the viability of a free software desktop, but of course that's nonsense, because they're helping the cause by forcing all resources to be focused on one target at the expense of near-term usability. And the XLibre crowd also aren't controlled opposition intended to weaponize the culture war and make people associate X with fascism, that's just nonsense some idiot cooked up to stir shit.

Re: Mwm – The smallest usable X11 window manager

#64
The very essential things a window manager should let me do are:

Launch applications (which might create new windows). Switch between windows. Close windows.

That sounds like the people who grew up using nothing but a smartphone all their lives. I find that there's an entire new generation of developers (and likely users) who don't understand basic window management at all --- all they have on their huge monitors all the time is one maximised application. Meanwhile I have several dozen windows open, all of various sizes, and when they see it, they are surprised at how I can work in such an environment.

No, I would not consider something that can't do what even Windows 1.0 could (tiled, nonoverlapping windows) a "window manager".

Re: Mwm – The smallest usable X11 window manager

#65
post #29
post #23

While this leaves a lot to be desired as a window manager, it illustrates one of my main gripes about the Wayland ecosystem: By effectively bundling the window manager and X server, it makes it much harder for more niche/experimental window managers to come about and stay alive. Even with things like wlroots, you have to invest a lot more work to get even the basics working that X11 will give you for free.

YAGN more experimental/niche window managers. Windows and macOS get by fine on one apiece, in fact their desktop story is better because their WM and toolkit is standardized. The developers of Wayland (who are identical to the developers of Xorg) aspire to more of a Windows/Mac-like ecosystem for Linux, in which standardization, performance, and support for modern graphics hardware without hacks or workarounds are pr…

> The developers of Wayland (who are identical to the developers of Xorg) aspire to more of a Windows/Mac-like ecosystem for Linux, in which standardization, performance, and support for modern graphics hardware without hacks or workarounds are prioritized over proliferation of niche window managers and toolkits

Is that why they arranged things to ensure that the Wayland world would always be split into GNOME, KDE, and everything else (in practice, wlroots)?

Re: Mwm – The smallest usable X11 window manager

#66
post #5

Earlier quoted context omitted.

Is it really that much better than this: #include #include int GetKeyCode(Display* d, char* s) { return XKeysymToKeycode(d, XStringToKeysym(s)); } int main() { Display* d = XOpenDisplay(0); Window r = DefaultRootWindow(d); XSelectInput(d, r, SubstructureRedirectMask); XGrabKey(d, GetKeyCode(d, "n"), Mod4Mask, r, 1, 1, 1); XGrabKey(d, GetKeyCode(d, "q"), Mod4Mask, r, 1, 1, 1); XGrabKey(d, GetKeyCode(d, "e"), Mod4Mask,…

Just for fun I reformatted it minimally in the conservative way I write code that is intended to be easy to read and understand to improve the odds of future contributors (or future me) introducing a bug in it due to misunderstanding it. It's painfully verbose but I think it's worth it considering that we're in 2025 and we're not limited to one character variable names. https://gist.github.com/leonardo-albertovich/98…

Sorry but you didn't just reformatted it, you added new variables and return statements that were not in the original code (and even introduced bugs like row 41).

As of short variable names, I'd argue that they are actually more readable than long ones when they're the iterator of a loop:

  while... XNextEvent(... &e)
What else can "e" stand for in the body of this loop?

Longer lifetimes and not-as-obvious scopes do deserve longer names.

Finally, I strongly dislike this kind of reversed conditions:

  if (const == var)
To paraphrase your own words, we're in 2025 and we should not be limited by our fear of forgetting one "=".

Re: Mwm – The smallest usable X11 window manager

#67

I wish things were as easy as they were with X11. Being able to ssh into a box and “export DISPLAY=192.168.0.7:0.0” then start an app and have it show up locally is just magical.

Yeah, the days of remote displaying unwanted adult content on other computers on university lab for anyone clueless about xhost command, as teenagers do.

Re: Mwm – The smallest usable X11 window manager

#69
post #13

Earlier quoted context omitted.

The best apps I've used have implementations for every OS and UI separately. Usually, everyone uses the easier route, but it will only be good enough, not the best. But again, now your app works only on Windows.

Yeah those apps were my inspiration: use the native UI and share logic as a lib. I don't even have a Mac yet, so no point in shipping for that if I can't debug it. If sales are good, I'd be glad to buy a cheap macbook off ebay and port it.

Even better if the library code is properly written, not only you can have multiple GUI frontends, you can make the CLI folks equally happy, and most of the code remains portable.

Naturally nowadays this is too much to ask for, so many ship the Chrome Application Platform instead.

Re: Mwm – The smallest usable X11 window manager

#70
post #23

While this leaves a lot to be desired as a window manager, it illustrates one of my main gripes about the Wayland ecosystem: By effectively bundling the window manager and X server, it makes it much harder for more niche/experimental window managers to come about and stay alive. Even with things like wlroots, you have to invest a lot more work to get even the basics working that X11 will give you for free.

> Even with things like wlroots, you have to invest a lot more work to get even the basics working that X11 will give you for free.

Like what?

A few years ago I copied the wlroots example, simplified it to less than 1000 LoC and then did some of my own modifications and additions like workspaces. And this side-project was done in less than a week on my spare time.

Post reply on HN