ewx: Emacs can do wayland now :)
This is the dawn of a wayland compositor integrated into emacs.
% git clone http://perma-curious.eu/ewx.git
This is a demo & not ready for serious usage!
TOC
- ews.c
- Wayland Server in C
- ewc.el
- Wayland Client in Elisp
- ewp.xml
- Wayland Protocol
- ewl.el
- Wayland layout (named buffer in talk)
HOW?
Most wayland compositors have the window manager inside the core. This uses a minimal wayland server that talks to Emacs instead. Wayland is all about talking and you can just extend it with your own protocols. This is what I did.
Check it out @ ewp.xml
I got the idea from https://github.com/riverwm/river
YEAH BUT WHY?
- Show anything that can do a wayland surface inside Emacs
- Get input & output handling into Emacs
= NEXT level EXWM
QUESTIONS & FEEDBACK
I would appreciate your opinion & design feedback:
- Think of a more poetic name?
I like the description of the different parts: ew*
But * is tricky and there is already eww. - How to surface input handling to the user?
What would be a nice Elisp interface?
Think about EXWM input filtering and simulation. - How to embed wayland widgets?
I have not researched this yet. But I think there needs to be some support in Emacs core. Xwidgets are there at least.
Maybe there is a more coherent story for embedding in emacs?- (CURRENT STATE: nested rectangles
windows inside a frame | windows show a buffer |
a buffer is mostly unicode BUT also pictures & widgets)
- (CURRENT STATE: nested rectangles
- Wayland is done by C people. Can we do an even more lispy wayland client?
Patches, ideas, whatever: perma-curious@posteo.de
If your message should be part of the public discussion please tell me.
HOW TO DEMO?
If you run guix then good for you and you can just:
% guix shell –manifest=manifest.scm – make check
This runs ewx nested under your current window manager.
You do not use guix yet? Just install the dependencies listed
in manifest.scm manually. Afterwards run:
% make check
REFERENCES
- Trailblazers
- Wayland
- Also
NEXT | WHERE COULD THIS LEAD?
Emacs display engine does the composition (How? Does STEPS help?). It provides a wayland server for other applications to hook into.
-> WinWin
- Emacs stays independent, becomes more powerfull
- and it can be expected that many things learn speaking wayland eventually. So emacs can incorporate (/shell) them.
- Actual major window manager / wayland helper code could stay a plugin based on wlroots?