BonsaiWM is a compact, opinionated Wayland compositor based on dwl.
- Ready to use with sane, opinionated defaults
- Minimal external dependencies
- Extensible via Lua
BonsaiWM loads config.lua from the first existing location:
$XDG_CONFIG_HOME/bonsaiwm/config.lua$HOME/.config/bonsaiwm/config.lua
If neither file is found, builtin defaults are used. The config is re-read on every reload (Mod-Shift-R), so environment variable changes are honored.
See config.d.lua for the full bonsaiwm global type definitions, and config.lua for a commented example.
Lua is for configuration only: setting options, declaring window rules, picking layouts, and binding keys. You can bind a key to a lua function, but the callback runs in a bare stdlib VM and cannot touch compositor state (clients, tags, monitors) for the moment. Shell out with os.execute if you need to.
BonsaiWM speaks ext-workspace-v1, so any bar that supports it can display your tags and switch between them:
"modules-right": ["ext/workspaces"],
"ext/workspaces": {
"format": "{name}",
"on-click": "activate",
"ignore-hidden": false
}ignore-hidden: false also shows empty tags, giving the classic nine-button dwm look.
See the roadmap for what's planned.
This project is mainly tradcoded. I use AI assistance for exploring ideas, prototyping, learning, code reviews and reorganizing the codebase.
BonsaiWM began by extending dwl, which itself started from the TinyWL example provided (CC0) by the sway/wlroots developers. MangoWM was a major inspiration for this project.
Huge thanks to the dwl developers and community for their work, which made BonsaiWM possible.