triad: data-oriented window manager for the River Wayland compositor

Lobsters Hottest Tools

Summary

Triad is a dynamic window manager for the River Wayland compositor that separates display from policy, using tags, rules, IPC, and embedded Janet scripting to enable scriptable window placement and multiple layouts.

<p><a href="https://lobste.rs/s/hcicuz/triad_data_oriented_window_manager_for">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 05/16/26, 05:14 PM

greenm01/triad

Source: https://github.com/greenm01/triad

Triad

https://github.com/user-attachments/assets/27e4bde8-95fc-40cf-9830-5373ac0bcc74

Triad is a dynamic window manager for Wayland, built for the River compositor. It separates display from policy: River handles the Wayland protocol while Triad manages window placement. This decoupling ensures resilience; if Triad restarts, your windows remain in place.

Triad treats your session as flat data. Windows carry tags rather than living in a rigid hierarchy. This makes conditional logic efficient, turning window management into a scriptable engine.

Need a screen lock? See LockMe.

The Triad

Triad is built on Tags, Rules, and IPC.

Tags provide stable, concurrent labels for windows. Rules, written in KDL, provide declarative defaults. IPC exposes a snapshot of the model over a Unix socket. Together, they allow external scripts to serve as a policy layer. A script can query the number of windows on a tag or the current layout before placing a new application.

Scriptable Policy with Janet

Configuration handles the predictable; code handles the exceptions.

Triad embeds Janet—a small, data-oriented Lisp—to support conditional logic. Janet scripts receive Triad’s state as native tables and execute placement functions directly, avoiding the overhead of socket communication and JSON parsing.

This enables App Manifests: sandboxed Janet scripts that evaluate the desktop context to dictate layout. They are executable alternatives to X11 window hints, allowing your environment to adapt based on active windows.

Scrolling and Other Layouts

Triad features a scrolling layout that provides a fluid canvas for your workflow.

It also supports 11 other layout modes, including Master-Stack, Grid, and Monocle. You can toggle between them independently for every workspace.

The Shell Ecosystem

Triad natively supports both Waybar and Quickshell.

While it has a native JSON stream, it also projects state as Niri-shaped JSON. You can use existing Waybar configurations or Quickshell themes—such as Noctalia-shell or DankMaterialShell—without modification.

Features at a Glance

  • Crash Resilience: Decoupling policy from the compositor means layout errors do not affect your session.
  • Waybar & Quickshell Ready: Niri-shaped JSON projection ensures compatibility with popular shell ecosystems.
  • Dynamic Workspaces: Spawns workspaces when needed and prunes them when empty.
  • Smooth Motion: Uses configurable frame pacing and exponential easing for window movements.
  • The Scratchpad: Manages utility windows as centered overlays.
  • Stable Identity: Tag and window IDs remain constant for use in long-running scripts.

Installation

For complete installation and session setup instructions, refer to INSTALL.md. The fastest path for Nix users is:

git clone https://github.com/greenm01/triad.git
cd triad
nix develop
nix build .#triad
nix run .#install-session

On non-NixOS systems, install-session registers the display-manager session under /usr/share/wayland-sessions by default. On NixOS, use the flake’s nixosModules.default module and set programs.triad.enable = true. See INSTALL.md for both paths.

Toolchain

Triad tracks stable Nim via choosenim.

choosenim update self
choosenim update stable
nim --version

The compiler must report Nim 2.2.4 or newer before running the full preflight.

Development Checks

Use the standard tasks while iterating:

nimble test
nimble build
nimble tidy

Before publishing changes, run the full local preflight:

nimble verify
nimble liveReload

verify requires a clean working tree, runs tests and builds, tidies generated artifacts, and ensures no executable binaries are left behind. For runtime-facing work, execute nimble liveReload from inside a live session.

Additional Resources:

  • Live Testing: docs/live-testing.md
  • Configuration Guide: docs/configuration.md
  • VT Switching & Recovery: docs/qemu-vt-smoke.md
  • Daily-Driver Gates: docs/daily-driver-gates.md

IPC & Navigation

You can interact with Triad’s IPC socket directly using the CLI:

triad msg focus-next
triad msg toggle-overview
triad msg layout-tile

For a comprehensive guide to commands and the JSON state protocol, see docs/ipc.md.

License

Triad is released under the MIT License.

Similar Articles

@wsl8297: While browsing GitHub, I stumbled upon a real powerhouse: niri. It directly bypasses the age-old desktop problem of "windows getting squished when there are too many" and completely reimagines window management. niri adopts a scrollable tiling approach: windows are arranged in columns on an "infinitely extending" horizontal strip. When you open a new window, it doesn't forcefully compress existing ones; on multi-monitor setups, each screen has its own independent workspaces and window strips, clean and efficient.

X AI KOLs Timeline

This article introduces the open-source project niri, a new Wayland-based desktop compositor that avoids traditional window crowding issues through a scrollable tiling layout, and supports features such as dynamic workspaces, independent multi-monitor management, and custom shader animations.

Xfwl4's First Preview Release

Lobsters Hottest

Brian Tarricone announces the first preview release of xfwl4, Xfce's Wayland compositor, after six months of work, detailing known missing features and future plans.

TriAdReview: Triangular Adversarial Review Architecture for Multi-Model Technical Document Generation

arXiv cs.LG

This paper proposes TriAdReview, a triangular adversarial review architecture that uses two independent reviewer models (engineering and boundary perspectives) and a judging mechanism to iteratively improve a generator model's output for technical document generation. Experiments show a 10.1% overall improvement over single-model baselines, with strong gains in security audit, code generation, and architecture design, but a degradation on requirements analysis indicating task-dependent effectiveness.