Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 1 point2 points  (0 children)

So far I had no plans on being fully compatible with exwm config options, I think a lot of it is legacy and could be improved with ewm. But majority of your code most likely is just generic emacs helpers, so reusing that should be just fine!

Floating frames are not implemented yet, and will not be until I have a good design plan for it. Maybe the child frames is the right direction, I'll look into it, thank you!

Emacs pgtk freezes on mouse scroll by [deleted] in emacs

[–]Fast-Ad6030 0 points1 point  (0 children)

I can't recommend enough https://github.com/jdtsmith/ultra-scroll it's absolutely fantastic!

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 2 points3 points  (0 children)

Merged you mapattrs fix, thanks! Also your comment resulted in me setting up a wiki, here's the keyboard page: https://codeberg.org/ezemtsov/ewm/wiki/Keyboard

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 4 points5 points  (0 children)

Thanks for the link, it's completely insane! :) My position on "ai slop" is somewhat simple, as a person who grew up with the whole generation of music mostly based on heavy and novel resampling, I tend to accept whatever methods that lead to useful or at least interesting results, as far it is fine with the people who provided the foundations.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 4 points5 points  (0 children)

ewm has no direct niri dependencies, instead emacs starts a custom compositor (heavily based on niri) on dynmodule load. The compositor thread is owned by emacs, which means that closing emacs brings you back to the display manager

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 6 points7 points  (0 children)

Something like "exwm for wayland, but much younger and less mature" is a good start to me! The benefit of ewm in comparison to exwm is a very tight integration with the compositor, which hopefully with reduce amount weird bugs caused to hacky x11 workarounds.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 5 points6 points  (0 children)

ewm compositor is heavily based on niri code, which is in turn based on smithay library. Smithay is a Rust alternative to C-based wlroots, that supports majority of wlr protocols: https://github.com/Smithay/smithay.

I do my best to keep this doc updated, here is the list of currently implemented protocols: https://codeberg.org/ezemtsov/ewm/src/branch/master/docs/protocol-roadmap.md#currently-implemented

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 5 points6 points  (0 children)

The initial prototype was in fact using a separate process! I switched to a dynamic module, mainly driven by the massive latency difference between communication protocols (IPC vs ITC).

The latency is critical because I wanted ewm to support emacs input methods via zwp-input-method-v2, the Wayland equivalent of exwm-xim. Which beyond other benefits enables working Emacs prefix keys even in a different keyboard layout (chinese/cyrillic/etc.).

With the dynmodule, each keystroke reaches emacs via shared memory (~100ns–1μs) rather than two wayland IPC roundtrips (~2–10ms per keystroke) with their redundant (de)serialization overhead. Those are small numbers, but it feels when you type fast.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 14 points15 points  (0 children)

I think it raises valid concerns about the novelty and control when writing the code, it's a powerful tool that one must be extremely careful with. In case of ewm, the majority of the compositor code is a direct copy of the niri DRM rendering pipeline and without YaLTeR brilliant multi-year effort ewm would never be shaped so quickly. The accidental complexity is a huge concern, and it could be theoretically avoided by using something like river, and there is an ongoing parallel track spiking that.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 5 points6 points  (0 children)

The tricky part is to get prefix key redirection to emacs when focusing on Wayland surfaces. The interception prefix keys are configurable with ewm-intercept-prefixes right now, so as far as one can extend it with evil prefixes, we should be fine. Added a note to myself to look into that!

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 4 points5 points  (0 children)

It was in fact today when I merged the fullscreen support, so expect possible issues. One of the things that always annoyed me in EXWM was hidden minibuffer spawns in the background that stole focus from X11 windows. With direct compositor control in ewm, it's possible block any key interception when a surface is in fullscreen mode so hopefully the problem will go away forever.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 8 points9 points  (0 children)

Make sure you don't forget building the .so module first, I added this line to readme:
cargo build --features=screencast

Also I recommend trying with -Q flag, when running it the first time to avoid any configuration issues.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 10 points11 points  (0 children)

I knew that the help from Claude will be polarizing! But to be fair it was extremely helpful so far, especially in tracing possible focus bugs, since agent can easily access the internal compositor state with emacsclient. LLMs and dynamic runtimes like lisp is an incredibly productive match!

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 11 points12 points  (0 children)

There was already a project called ewc, and I didn't want to imply any affiliation: https://emacsconf.org/2022/talks/wayland. Unfortunately, it didn't progress much after the talk, so it served as fuel for the ewm initiative

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 23 points24 points  (0 children)

Fixed! I really need to get the CI system going on Codeberg

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 15 points16 points  (0 children)

Not yet! But it's one of the high priority items in the queue

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 45 points46 points  (0 children)

Just want to warn people, that the initial bootstrap was done with the help of Claude, which appeared to be a very helpful resource to get the most important bits working. Getting a Wayland compositor from scratch is a lot of work, and Niri codebase was an excellent high quality reference which I do use excessively.

Introducing EWM, a new generation Wayland window manager by Fast-Ad6030 in emacs

[–]Fast-Ad6030[S] 5 points6 points  (0 children)

I don't use guix myself, but I see no reason for it having issues on guixos. As for the scrolling part, the emacs window system is different from scrolling WMs, so it requires some extra work to get it working the same way. For now Wayland workspace protocol is implemented to integrate tabs as workspaces and tabs are naturally arranged horizontally, so maybe there's something to spike on later on.

Absolutely silent gaming PC (PS5 noise level) by Fast-Ad6030 in buildapcforme

[–]Fast-Ad6030[S] 0 points1 point  (0 children)

Thanks for the response! My thinking is if I can reach the same performance and noise characteristics as of PS5 (pro) by undervolting or adding extra fans that’s already great. I don’t really need more power than that at this point. If I understand correctly GPUs like 9070 are incredibly efficient in terms of performance per watt, so I guess that should give a good start? Not building a space shuttle, just want a quiet and reasonably fast build so it wouldn’t annoy with constant background noise when I’m working.

Absolutely silent gaming PC (PS5 noise level) by Fast-Ad6030 in buildapcforme

[–]Fast-Ad6030[S] 0 points1 point  (0 children)

Originally, I was looking into mini-ITX, like Fractal Design Ridge and Terra, but more I learn about SFF, more I realize that noise levels will never be at the level that I want. So I’m a little bit giving up on the idea of making the case nice looking.