Configs2026年5月28日·1 分钟阅读

niri — Scrollable-Tiling Wayland Compositor

niri is a scrollable-tiling Wayland compositor written in Rust. It arranges windows in an infinite horizontal strip that you scroll through, eliminating manual tiling decisions while keeping a keyboard-driven workflow.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
niri Overview
直接安装命令
npx -y tokrepo@latest install 5909f918-5a4e-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

niri is a Wayland compositor that introduces scrollable tiling as its core paradigm. Instead of splitting the screen into quadrants or columns, windows are laid out in an infinite horizontal strip. You scroll left and right to navigate between them, removing the cognitive overhead of choosing split directions.

What niri Does

  • Arranges windows in an infinite scrollable horizontal strip
  • Provides automatic tiling without manual layout decisions
  • Supports workspaces stacked vertically for organizing window groups
  • Offers configurable window rules, animations, and key bindings
  • Runs natively on Wayland with full HiDPI and multi-monitor support

Architecture Overview

niri is built on the Smithay library, a Rust framework for Wayland compositors. It communicates with the Linux kernel via the DRM/KMS subsystem for display output and uses libinput for input handling. The compositor implements the wlr-layer-shell and xdg-shell protocols for compatibility with standard Wayland clients. Window layout is managed by an internal scrolling engine that tracks viewport position and animated transitions.

Self-Hosting & Configuration

  • Install via your distro package manager or build from source with Cargo
  • Configuration lives in ~/.config/niri/config.kdl using the KDL format
  • Define key bindings, window rules, and output settings in the config file
  • Set environment variables like WAYLAND_DISPLAY for client applications
  • Integrate with status bars like Waybar using the wlr-layer-shell protocol

Key Features

  • Scrollable tiling eliminates the need to choose split directions
  • Dynamic column widths with preset sizes (one-third, half, two-thirds)
  • Smooth animations for window opening, closing, and scrolling
  • Built-in screenshot tool with interactive area selection
  • Automatic workspace creation and cleanup as windows come and go

Comparison with Similar Tools

  • Sway — i3-compatible manual tiler; niri removes layout decisions entirely
  • Hyprland — Feature-rich dynamic compositor; heavier, more configuration surface
  • river — Minimal dynamic tiler with external layout generators; different philosophy
  • COSMIC — System76 desktop environment; full DE vs focused compositor
  • dwl — dwm-like Wayland compositor; manual tagging model vs scrolling model

FAQ

Q: Can I run X11 applications in niri? A: Yes, niri supports XWayland for running legacy X11 applications alongside native Wayland clients.

Q: How do I switch between workspaces? A: Workspaces are stacked vertically. Use configured key bindings (typically Mod+Up/Down) to switch between them.

Q: Does niri support multiple monitors? A: Yes. Each monitor gets its own independent set of workspaces and scrollable window strips.

Q: Is niri suitable for daily use? A: Many users run niri as their primary compositor. It is actively developed with frequent releases and a growing community.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产