1
0
Fork
You've already forked river
0
forked from river/river
A non-monolithic Wayland compositor
  • Zig 99.7%
  • C 0.3%
Sivecano cd889b4676 Window: fix crashes induced by not returning after sending an error message
in three places we continue control flow despite recognizing erroneous arguments and
informing the client of such. This leads to crashes due to assertion failures
2026年01月07日 00:32:37 +01:00
.builds ci: check REUSE specification compliance 2026年01月01日 16:47:51 +00:00
.gitea/issue_template doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
.github/workflows doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
common doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
contrib doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
doc doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
LICENSES doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
logo doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
protocol protocol: minor clarifications 2026年01月04日 20:01:02 +00:00
river Window: fix crashes induced by not returning after sending an error message 2026年01月07日 00:32:37 +01:00
.editorconfig editorconfig: remove dead code 2026年01月01日 17:01:10 +00:00
.gitignore doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
.mailmap doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
build.zig doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
build.zig.zon doc: use the REUSE licensing specification [1] 2026年01月01日 16:41:52 +00:00
CODE_OF_CONDUCT.md doc: fix last missing © symbols 2026年01月01日 16:59:16 +00:00
CONTRIBUTING.md doc: fix last missing © symbols 2026年01月01日 16:59:16 +00:00
PACKAGING.md doc: fix last missing © symbols 2026年01月01日 16:59:16 +00:00
README.md doc: fix last missing © symbols 2026年01月01日 16:59:16 +00:00

Overview

River is a non-monolithic Wayland compositor. Unlike other Wayland compositors, river does not combine the compositor and window manager into one program. Instead, users can choose any window manager implementing the river-window-management-v1 protocol.

There is a list of window managers implementing the river-window-management-v1 protocol on our wiki.

If you are looking for the old dynamic tiling version of river, see river-classic.

Features

River defers all window management policy to a separate window manager implementing the river-window-management-v1 protocol. This includes window position/size, pointer/keyboard bindings, focus management, window decorations, desktop shell graphics, and more.

River itself provides frame perfect rendering, good performance, support for many Wayland protocol extensions, robust Xwayland support, the ability to hot-swap window managers, and more.

Motivation

Why split the window manager to a separate process? I aim to:

  • Significantly lower the barrier to entry for writing a Wayland window manager.
  • Allow implementing Wayland window managers in high-level garbage collected languages without impacting compositor performance and latency.
  • Allow hot-swapping between window managers without restarting the compositor and all Wayland programs.
  • Promote diversity and experimentation in window manager design.

Current Status

The first release supporting the river-window-management-v1 protocol will be 0.4.0. The protocol is implemented on river's main branch and is already robust/feature complete enough for me to use as my daily driver. There are however missing features that need to be implemented before the 0.4.0 release, for example keyboard layout configuration.

Currently the only documentation for the river-window-management-v1 protocol is the protocol specification itself. While this is all developers comfortable with writing Wayland clients should need, I'd like to add some more beginner-friendly documentation including a well-commented example window manager before the 0.4.0 release.

I would also like to get more feedback on the river-window-management-v1 protocol before the 0.4.0 release. If you are working on a window manager and have questions/feedback I'd love to hear from you!

With regards to protocol stability, my goal is to never make a backwards incompatible change and stay at v1 forever. I've been iterating on this protocol since April 2023 and am quite confident in the design and extensibility of the current protocol.

If everything goes well with the 0.4.0 release, I expect the following non-bugfix release to be river 1.0.0. After river 1.0.0, all backwards incompatible changes will be strictly avoided.

Building

Note: If you are packaging river for distribution, see PACKAGING.md.

To compile river first ensure that you have the following dependencies installed. The "development" versions are required if applicable to your distribution.

  • zig 0.15
  • wayland
  • wayland-protocols
  • wlroots 0.19
  • xkbcommon
  • libevdev
  • pixman
  • pkg-config
  • scdoc (optional, but required for man page generation)

Then run, for example:

zig build -Doptimize=ReleaseSafe --prefix ~/.local install

To enable Xwayland support pass the -Dxwayland option as well. Run zig build -h to see a list of all options.

Usage

River can either be run nested in an X11/Wayland session or directly from a tty using KMS/DRM. Simply run the river command.

On startup river will run an executable file at $XDG_CONFIG_HOME/river/init if such an executable exists. If $XDG_CONFIG_HOME is not set, ~/.config/river/init will be used instead.

Usually this executable is a shell script which starts the user's window manager and any other long-running programs.

For complete documentation see the river(1) man page.

Donate

If my work on river adds value to your life and you'd like to support me financially you can find donation information here.

Licensing

This project follows the REUSE Specification, all files have SPDX copyright and license information.

In overview:

  • River's source code is released under the GPL-3.0-only license.
  • River's Wayland protocols are released under the MIT license.
  • River's logo and documentation are released under the CC-BY-SA-4.0 license.