ScriptsJul 25, 2026·3 min read

Mango — Practical Wayland Compositor Inspired by dwm

A Wayland compositor inspired by dwm, focusing on simplicity and a practical tiling workflow. Mango is written in C and provides a minimal, hackable compositor for users who prefer the dwm philosophy on Wayland.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Mango Wayland Compositor Guide
Direct install command
npx -y tokrepo@latest install fd1da450-8805-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

Mango is a Wayland compositor inspired by the dwm window manager, carrying forward the philosophy of simplicity, minimal code, and configuration through source code editing. Built in C on top of the wlroots library, Mango provides a tiling window management experience on Wayland for users who value a small, understandable codebase that can be patched and customized at the source level.

What Mango Does

  • Provides automatic tiling window management on Wayland following the dwm master-stack layout
  • Supports multiple tags (virtual desktops) for organizing windows into workspaces
  • Handles keyboard-driven window management with configurable keybindings defined in source code
  • Renders window decorations and status bar information within the compositor
  • Manages multi-monitor setups with per-output tag assignments

Architecture Overview

Mango is built in C using the wlroots library, which provides the low-level Wayland protocol implementation and rendering infrastructure. Following dwm's philosophy, the compositor is designed to be a single-file or small set of source files where configuration is done by editing config.h and recompiling. The architecture leverages wlroots for input handling, output management, and the Wayland compositor protocol, while Mango implements the tiling logic, tag management, and keybinding layer on top.

Self-Hosting & Configuration

  • Configuration is done by editing config.h in the source code and recompiling, following the dwm tradition
  • Keybindings, colors, border widths, and layout parameters are all defined as C constants in the config header
  • Building requires wlroots, wayland-protocols, and standard C build tools (gcc/clang, make, pkg-config)
  • The compositor is started by running the mango binary from a TTY or display manager
  • Custom patches can be applied to the source code to add features, similar to the dwm patching workflow

Key Features

  • Minimal codebase designed to be read, understood, and modified by individual users
  • dwm-inspired tiling with master-stack layout and tag-based workspace management
  • Built on wlroots for robust Wayland protocol support and hardware acceleration
  • Source-level configuration that eliminates runtime config file parsing overhead
  • Lightweight resource footprint suitable for older hardware or minimal Linux installations

Comparison with Similar Tools

  • dwl: Another dwm-inspired Wayland compositor; Mango takes a similar approach with its own implementation choices
  • Sway: i3-compatible Wayland compositor with runtime config files; Mango uses source-level configuration like dwm
  • Hyprland: Feature-rich Wayland compositor with animations; Mango prioritizes minimalism and simplicity
  • River: Tag-based Wayland compositor in Zig; Mango follows dwm conventions more closely in C

FAQ

Q: How do I configure Mango? A: Edit config.h in the source code to change keybindings, colors, and layout settings, then recompile. There are no runtime configuration files.

Q: Does Mango support Wayland protocols like XDG-decoration? A: Mango implements core Wayland protocols through wlroots. Protocol support depends on the version and what the project has implemented.

Q: Can I run X11 applications in Mango? A: XWayland support depends on whether it has been compiled in. Check the project documentation for current XWayland status.

Q: Is Mango suitable for daily use? A: Mango targets users comfortable with dwm-style compositors. Evaluate the current feature set against your needs before adopting it for daily use.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets