Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
#+TITLE: ewx: Emacs can do wayland now :) #+SUBTITLE: This is /the dawn of/ a wayland compositor integrated into emacs. #+OPTIONS: toc:nil num:nil ~% git clone http://perma-curious.eu/ewx.git~ *This is a demo & not ready for serious usage!* # But I am planning to use it ;) # Have a look at this short talk I gave at EmacsConf22: #+begin_export html <iframe title="EmacsConf 2022: Emacs should become a Wayland compositor - Michael Bauer" src="https://toobnix.org/videos/embed/6c3c417a-1306-4b23-90e9-4364c3162779" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups" width="560" height="315" frameborder="0"></iframe> #+end_export * 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? 1. Show anything that can do a wayland surface inside Emacs 2. Get input & output handling into Emacs = *NEXT level EXWM* * QUESTIONS & FEEDBACK I would appreciate your opinion & design feedback: 1. Think of a more poetic name?\\ I like the description of the different parts: ew*\\ But * is tricky and there is already eww. 2. How to surface input handling to the user?\\ What would be a nice Elisp interface?\\ Think about EXWM input filtering and simulation. 3. 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)\\ 4. 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 - https://github.com/ch11ng/exwm - https://github.com/ch11ng/xelb - Wayland - https://wayland-book.com - https://wayland.freedesktop.org - https://github.com/swaywm/wlroots - https://github.com/Hjdskes/cage - https://github.com/riverwm/river - Also - https://github.com/stumpwm/mahogany - https://git.sr.ht/~shunter/wayflan - https://github.com/swaywm/sway * 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?