No description
  • Rust 78.5%
  • Emacs Lisp 13.5%
  • Shell 7.1%
  • Nix 0.5%
  • GLSL 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-10 02:22:22 +08:00
compositor [build] add scheme-rs 2026-10-10 02:22:22 +08:00
docs feat(floating): drag a float across outputs 2026-10-07 22:27:23 +02:00
emacs test(wl-skia): tolerate watchdog-forced full presents in damage check 2026-07-27 14:20:45 +02:00
etc feat(surface): track shell CWD in surface buffers 2026-02-25 16:20:27 +01:00
gentoo fix(gentoo): link libEGL and libwayland-client 2026-09-30 22:32:57 +09:00
lisp fix(input): accept modified key events in Customize 2026-10-09 10:31:00 +02:00
nix build(deps): bump smithay to 904d3bda 2026-10-07 13:45:11 +02:00
resources session: avoid deprecated systemd environment import 2026-06-01 13:03:30 +02:00
tests fix(input): accept modified key events in Customize 2026-10-09 10:31:00 +02:00
.envrc chore: update gitignore and add .envrc 2026-02-07 20:09:01 +01:00
.gitignore docs: show ewm in a recorded demo instead of a screenshot 2026-10-05 17:25:58 +02:00
flake.lock build(nix): lock nixpkgs to the system's npins revision 2026-09-29 17:50:23 +02:00
flake.nix feat(nix): offer emacs31-pwayl as an opt-in package 2026-08-14 15:21:38 +02:00
LICENSE docs: rewrite README and add LICENSE 2026-02-07 20:09:01 +01:00
README.md docs: show ewm in a recorded demo instead of a screenshot 2026-10-05 17:25:58 +02:00
shell.nix fix(nix): use libdisplay-info 0.3 in the devshell 2026-09-08 15:12:31 +02:00

ewm - Emacs Wayland Manager

ewm is a modern, fast Linux desktop environment written in Rust, based on Smithay, and running as a dynamic module inside of your emacs session. Graphical applications appear as normal emacs buffers, and are managed with the same commands, keybindings, and workflows as the rest of your configuration.

The main goal of ewm is to offer a distraction-free working environment, optimized for keyboard input. Most emacs actions do not require visual feedback: once a command sequence is learned, it can be executed blindly through deterministic key presses. Over time this creates a huge productivity boost, with virtually no skill cap. The only missing piece with emacs was graphical windows, and ewm solves that by making Wayland windows part of the Emacs environment itself.

quick start

Launch apps with s-d. See the wiki for full setup, configuration, and NixOS instructions.

For local development and testing, I use the helper script, started from inside nix-shell:

cd compositor
./test.sh

The script builds ewm with screencast support, sets EWM_MODULE_PATH, and starts Emacs with --fg-daemon=vt2. Pass an init directory as the only argument when you need one, for example ./test.sh /etc/nixos/emacs. The named daemon is intentional: plain --fg-daemon uses the default Emacs server socket and can conflict with an existing Emacs daemon. Connect to this session with emacsclient --socket-name=vt2.

current features

  • Wayland applications as regular Emacs buffers
  • Emacs-native window management, focus, keybindings, and fullscreen
  • Multi-monitor DRM backend with hotplug, output configuration, and fractional scaling
  • Layer-shell, workspace, screen lock, idle, activation, system bell, clipboard, and drag-and-drop protocol support
  • Screen sharing through xdg-desktop-portal and PipeWire
  • Input methods and keyboard configuration integrated with Emacs
  • External app launching through XDG desktop entries

known limitations

  • GPU selection is automatic (no override)
  • Must run from TTY (no nested mode)

inspirations

  • EXWM (Emacs side): Buffer-per-window model, prefix key interception, automatic focus management
  • niri (Compositor side): Backend architecture, Smithay patterns, DRM abstraction

approach

Writing a Wayland compositor from scratch is a staggering amount of work. I wanted to switch from EXWM as soon as possible, so the initial bootstrap was done with a bunch of agentic tools, which helped a lot in reverse-engineering the brilliant niri codebase and surgically extracting the pieces relevant to ewm. Today, coding agents are used mainly to compare ewm against niri and other relevant references to catch divergences from proven Smithay compositor patterns before they become correctness, performance, or reliability issues. This feedback loop is a major reason ewm could be built quickly while still becoming fast and reliable enough for daily use.

For people who are strictly against LLMs and prefer to keep their hands completely clean, I highly recommend checking out another take on a Wayland-based emacs compositor from my great friend tazjin: reka. It's based on River, so at a small cost in features it helped to contain the complexity enough to write everything by hand in a relatively short time.

community

Join the Matrix room: #ewm:matrix.org

license

GPL-3.0-or-later