PromptHub
Back to Blog
Developer Tools Linux Desktop

Niri: The Scrollable Tiling Wayland Compositor

B

Bright Coding

Author

14 min read 14 views
Niri: The Scrollable Tiling Wayland Compositor

Stop Fighting Your Tiling WM: Niri's Scrollable Strip Changes Everything

What if every time you opened a new terminal, your existing windows didn't shrink into microscopic rectangles? What if your monitors never bled into each other like a bad watercolor painting? What if—hear me out—window management actually felt intuitive?

If you've ever rage-quit i3 because your carefully crafted layout exploded after opening Slack, or thrown your mouse at the wall because GNOME's workspace switching felt like navigating a maze blindfolded, you're not alone. The tiling window manager space has been stuck in a rut for years. Everyone copies everyone else. Vertical splits. Horizontal splits. Binary trees. Zzz.

But something strange is happening in the niri GitHub repository. Developers are abandoning their decade-old dotfiles. Sway users are jumping ship. Even the most stubborn i3 fanatics are whispering about "the scrollable strip." What makes this Rust-built Wayland compositor so dangerously addictive? Let's tear it apart and find out.

What is Niri? The Compositor That Broke the Rules

Niri is a scrollable-tiling Wayland compositor written in Rust by developer Ivan Molodetskikh. Born from frustration with existing solutions, it takes a radical approach to window management: instead of cramming windows into ever-shrinking grid cells, it arranges them in columns on an infinite horizontal strip that extends endlessly to the right.

The project draws heavy inspiration from PaperWM, a GNOME Shell extension that pioneered scrollable tiling. But PaperWM fought against GNOME's global coordinate system—a fundamental architectural mismatch. Ivan wanted clean monitor separation, native performance, and a compositor built from the ground up for this paradigm. Niri was the answer.

Released publicly in 2023, Niri has exploded in popularity throughout 2024-2025. It's now stable for daily driving, with a thriving community on Matrix and Discord. Major tech voices like Brodie Robertson and Nick Janetakis have featured it. LWN published a dedicated tour. The Moscow RustCon 2024 hosted a technical deep-dive into its testing and latency optimization strategies.

What makes Niri genuinely revolutionary isn't just the scrolling—it's how every design decision reinforces that core concept. Dynamic workspaces? Vertical, independent per monitor. Multi-monitor? Core to the architecture from day one, with mixed DPI support. Window overflow? Physically impossible by design. This isn't a tiling WM with scrolling bolted on. It's a scrolling-native environment that happens to tile.

Key Features: Why Developers Are Obsessed

Let's dissect what separates Niri from the sea of "me-too" tiling compositors:

Scrollable-Tiling Architecture: The infinite horizontal strip is Niri's DNA. Open twenty terminals—they don't shrink, they queue. Navigate with fluid gestures or keybinds. Your screen becomes a viewport into a larger workspace, not a prison forcing compromises.

Dynamic Workspaces (GNOME-Style): Workspaces spawn automatically as needed, arranged vertically. Every monitor maintains independent workspace sets. There's always one empty workspace waiting below—no manual creation, no deletion rituals. Disconnect a monitor? Its workspaces migrate intelligently. Reconnect? They return home. It's workspace management that actually understands physical reality.

The Overview: A zoomed-out exposé of all workspaces and windows, accessible via configurable keybind. Think macOS Mission Control, but for people who actually get work done. Visual navigation across your entire window strip without losing context.

Production-Ready Screencasting: Built-in screenshot UI plus monitor/window casting through xdg-desktop-portal-gnome. The killer feature? Block-out rules for sensitive windows—your password manager never leaks into screen shares. Dynamic cast targets let you switch what's being shared on the fly without restarting.

Input Device Mastery: Touchpad and mouse gestures for natural scrolling. Tablet support with per-monitor mapping. Touchscreen compatibility. OpenTabletDriver integration for artists. This isn't a keyboard-only cult; it's genuinely multi-modal.

Visual Polish That Matters: Gradient borders with Oklab/Oklch color spaces for perceptually uniform aesthetics. Background blur for windows and layer-shell surfaces. Custom shader support for animations. Live-reloading configuration—tweak your setup without logout cycles.

Accessibility First: Screen reader compatibility out of the box. In a space notorious for neglecting assistive technology, this matters enormously.

Xwayland Integration: Starting from version 25.08, legacy X11 applications run via xwayland-satellite—no janky workarounds, no broken apps.

Use Cases: Where Niri Absolutely Dominates

1. The Multi-Monitor Developer

You're running three displays—4K center, 1080p vertical left, ultrawide right. Traditional tiling WMs either treat this as one giant canvas (disaster) or force rigid per-monitor containers (frustrating). Niri gives each monitor its own independent window strip. Mixed DPI? Handled. Window overflow between monitors? Impossible by architecture. Your terminal stays crisp on the 4K display while your documentation remains readable on the 1080p.

2. The Terminal-Dense Sysadmin

Fifty SSH sessions. Ten log tails. Multiple monitoring dashboards. In i3/Sway, you'd need nested containers, tab groups, or microscopic fonts. In Niri, you scroll. Your windows maintain usable sizes; your brain maintains sanity. The strip becomes your mental model—left is older, right is newer, scroll to navigate.

3. The Streaming Content Creator

Screencasting with selective window blocking means your password manager, Slack DMs, and email client stay invisible to OBS while your IDE and browser stream cleanly. Dynamic cast targets let you switch from "coding view" to "terminal demo" without interrupting the broadcast. Touchpad gestures mean smooth transitions that don't look like you're wrestling your computer.

4. The Accessibility-Focused User

Screen reader compatibility isn't an afterthought—it's architectural. If you rely on assistive technology, most minimal tiling WMs are hostile territory. Niri provides a performant, modern Wayland environment without sacrificing accessibility, something even major desktop environments struggle with.

5. The Touchpad Laptop Warrior

Ditch the mouse. Niri's gesture support means three-finger swipes scroll your window strip, pinch gestures zoom into Overview, and touchpad navigation feels as natural as a phone interface—but for serious work. Combined with dynamic workspaces, laptop productivity finally matches desktop ergonomics.

Step-by-Step Installation & Setup Guide

Ready to escape tiling tyranny? Here's your escape plan.

Installation Methods

Arch Linux (Recommended):

# From AUR (kept current by community)
yay -S niri
# Or the -git version for bleeding edge
yay -S niri-git

NixOS:

# In your configuration.nix
programs.niri.enable = true;

Other Distributions: Check the Getting Started guide for distribution-specific packages. Niri is packaged for most major distributions; if yours lacks it, the Rust toolchain makes building straightforward.

Building From Source

# Clone the repository
git clone https://github.com/niri-wm/niri.git
cd niri

# Build with cargo (Rust toolchain required)
cargo build --release

# The binary appears at target/release/niri
# Install system-wide:
sudo install -Dm755 target/release/niri /usr/local/bin/niri

Essential Dependencies

Niri is not a complete desktop environment. You need companion components:

Component Purpose Recommended Options
Status bar System information waybar
Application launcher Run programs fuzzel
Notification daemon Desktop notifications mako or dunst
Polkit agent Authentication dialogs polkit-gnome or lxqt-policykit
Wallpaper Background images swaybg or wpaperd
Idle management Screen locking swayidle + swaylock

Display Manager Integration

For greetd/ly users, create /usr/share/wayland-sessions/niri.desktop:

[Desktop Entry]
Name=Niri
Comment=Scrollable-tiling Wayland compositor
Exec=niri
Type=Application

First Launch & Configuration

# Generate default config (or copy from documentation)
mkdir -p ~/.config/niri
cp /usr/share/doc/niri/config.kdl ~/.config/niri/

# Edit with your preferences
$EDITOR ~/.config/niri/config.kdl

The configuration uses KDL format—intentionally more readable than JSON or YAML for complex nesting. Changes apply instantly with live reload; no session restart needed.

REAL Code Examples: Niri in Action

Let's examine actual configuration patterns from Niri's documentation and community practices.

Example 1: Basic Window Rules and Layout

// ~/.config/niri/config.kdl

// Output configuration with scale and position
output "DP-1" {
    // Enable with preferred mode
    mode "3840x2160@144.000"
    // Fractional scaling: 1.5x for 4K displays
    scale 1.5
    // Position in global coordinate space
    position x=0 y=0
}

output "HDMI-A-1" {
    mode "1920x1080@60.000"
    scale 1.0
    // Place to the right of DP-1
    position x=2560 y=0
}

// Layout preferences
layout {
    // Gap between windows in logical pixels
    gaps 8
    
    // Border configuration with gradient
    border {
        off
        width 2
        // Oklch gradient: animated color cycling
        active-gradient from="#ff5555" to="#55ff55" angle=45 in="oklch" relative-to="workspace-view"
        inactive-color "#585b70"
    }
    
    // Default column width for new windows
    default-column-width { proportion 0.5; }
    
    // Struts: reserve space for bars/panels
    struts {
        left 0
        right 0
        top 32  // Reserve 32px for waybar
        bottom 0
    }
}

What's happening here? We're configuring two monitors with different DPIs—Niri handles the mixed scaling seamlessly. The position keys create a logical layout. The gradient border uses Oklch color space for perceptually smooth transitions (no weird gray midpoints like RGB gradients). The struts reserve space for our status bar, preventing windows from overlapping it.

Example 2: Window Rules for Screencast Privacy

// Window rules for application-specific behavior
window-rule {
    // Match KeePassXC password manager
    match app-id="org.keepassxc.KeePassXC"
    // Block from ALL screencasts automatically
    block-out-from "screencast"
    // Also useful: block from screen capture entirely
    // block-out-from "screen-capture"
}

window-rule {
    // Match any window with "private" in title
    match title="*private*"
    block-out-from "screencast"
}

window-rule {
    // Floating windows for dialogs
    match app-id="pavucontrol"
    open-floating true
}

window-rule {
    // Tab grouping for terminal instances
    match app-id="org.wezfurlong.wezterm"
    // Open in same tab group as existing terminals
    open-on-workspace "terminals"
    // Or use default-column-display "tabbed" for automatic tabs
}

Critical security feature: The block-out-from directive is Niri's secret weapon for streamers and professionals. Any matched window renders as a black rectangle in screencasts—your 1Password, your confidential Slack DMs, your medical records. This happens at the compositor level, so applications cannot override it. The title wildcard matching adds flexibility for dynamic content.

Example 3: Input Gestures and Keybinds

// Input device configuration
input {
    touchpad {
        // Natural scrolling direction
        natural-scroll true
        // Tap to click
        tap true
        // Disable while typing
        dwt true
        // Acceleration profile
        accel-speed 0.2
    }
    
    mouse {
        // Natural scroll for mice too
        natural-scroll true
        accel-speed 0.0
    }
}

// Touchpad gestures (three/four finger)
gestures {
    // Three-finger swipe up: show Overview
    three-finger-swipe-up { action spawn "niri" "msg" "action" "show-workspace-overview"; }
    // Three-finger swipe down: close Overview
    three-finger-swipe-down { action spawn "niri" "msg" "action" "close-workspace-overview"; }
    // Four-finger swipe left/right: switch workspace
    four-finger-swipe-left { action spawn "niri" "msg" "action" "focus-workspace-down"; }
    four-finger-swipe-right { action spawn "niri" "msg" "action" "focus-workspace-up"; }
}

// Keyboard shortcuts
binds {
    // Mod+Return: terminal
    Mod+Return { spawn "wezterm"; }
    
    // Mod+D: application launcher
    Mod+D { spawn "fuzzel"; }
    
    // Mod+Arrow keys: focus windows
    Mod+Left { focus-column-left; }
    Mod+Right { focus-column-right; }
    Mod+Up { focus-window-up; }
    Mod+Down { focus-window-down; }
    
    // Mod+Shift+Arrow: move windows
    Mod+Shift+Left { move-column-left; }
    Mod+Shift+Right { move-column-right; }
    
    // Mod+PageUp/PageDown: workspace switching
    Mod+PageUp { focus-workspace-up; }
    Mod+PageDown { focus-workspace-down; }
    
    // Mod+Shift+PageUp/PageDown: move to workspace
    Mod+Shift+PageUp { move-window-to-workspace-up; }
    
    // Mod+S: screenshot UI
    Mod+S { screenshot; }
    
    // Mod+Shift+E: quit Niri gracefully
    Mod+Shift+E { quit; }
}

Gesture architecture explained: Niri's gesture system uses the compositor's own IPC (niri msg action) for reliable execution. This avoids race conditions where gestures fire before the compositor is ready. The three-finger swipe to Overview mirrors macOS behavior—intuitive for converts—while four-finger workspace switching keeps navigation fluid. Keyboard binds follow predictable patterns: Mod for focus, Mod+Shift for move.

Example 4: Animation Customization with Shaders

// Animation configuration
animations {
    // Window open: slide from right with spring physics
    window-open {
        duration-ms 250
        easing {
            // Cubic bezier for snappy feel
            bezier 0.25 0.46 0.45 0.94
        }
    }
    
    // Window close: fade and scale down
    window-close {
        duration-ms 200
        easing linear
    }
    
    // Workspace switch: vertical slide
    workspace-switch {
        duration-ms 300
        // Custom shader for glitch effect (advanced)
        // shader "~/shaders/glitch.glsl"
    }
    
    // Horizontal scroll: the core animation
    horizontal-scroll {
        duration-ms 150
        // Spring physics for momentum feeling
        spring {
            damping-ratio 0.8
            stiffness 400
        }
    }
}

The spring physics matter: Notice horizontal-scroll uses spring parameters, not fixed duration. This means fast flicks travel further with satisfying momentum, while gentle nudges settle precisely. It's the difference between "scrolling" and scrolling. The commented shader path shows how deep you can go—write custom GLSL for truly unique transitions.

Advanced Usage & Best Practices

Master the Overview: Don't just use it for finding windows. Use it for rearranging. Drag-and-drop columns between workspaces in Overview mode. It's the fastest way to reorganize twenty windows without fifty key combinations.

Tab Groups for Context Switching: Group your "morning standup" windows (Slack, Zoom, calendar) into a tabbed column. Group your "deep work" windows (IDE, terminal, documentation) into another. Switch contexts by focusing the appropriate column, not by hunting across workspaces.

Strategic Block-Out Rules: Audit your screencast exposure proactively. Use niri msg windows to inspect window app-ids and titles, then craft rules before you need them. Test with niri msg action screenshot-screen to verify black rectangles appear where expected.

Performance on Modest Hardware: That Eee PC 900 from 2008? It runs Niri. Disable blur effects (background-blur false in window rules), reduce animation durations, and use solid borders instead of gradients. The scrollable paradigm actually reduces GPU load—no constant window resizing and repainting.

Monitor Hotplug Scripts: Niri preserves workspace arrangements intelligently, but you can enhance this with niri msg output commands in udev scripts. Custom behaviors for docking/undocking laptops, projector presentations, or KVM switches.

Comparison with Alternatives

Feature Niri Sway Hyprland i3 (X11) PaperWM
Paradigm Scrollable strip Traditional tree Traditional tree Traditional tree Scrollable (GNOME ext)
New window behavior No resize, scrolls Splits container Splits container Splits container No resize, scrolls
Multi-monitor Native, isolated strips Shared workspace Shared workspace Shared workspace Global coordinates
Dynamic workspaces Yes, vertical per-monitor Static Static Static GNOME's dynamic
Touchpad gestures Native Limited Yes N/A (X11) Limited
Screencast privacy Built-in block-out None None None None
Custom shaders Yes No Yes No No
Live config reload Yes Yes Yes No Requires restart
Monitor separation Guaranteed Possible with config Possible with config Possible with config Fought against GNOME
Accessibility Screen readers Limited Limited Limited GNOME's
Xwayland xwayland-satellite Integrated Integrated N/A (native X) N/A
Language Rust C C++ C JavaScript↗ Bright Coding Blog

Why Niri wins: The architectural guarantees. In Sway/Hyprland/i3, you can configure monitor isolation, but it's fragile—one stray keybind breaks it. Niri's strip-per-monitor design makes overflow impossible, not merely discouraged. The scrollable paradigm eliminates the "window shrinkage death spiral" entirely. And for GNOME users considering PaperWM: Niri gives you the workflow without fighting the underlying shell.

FAQ: Your Burning Questions Answered

Q: Is Niri ready for daily use? Absolutely. The developer daily-drives it. The community reports stable performance. Version milestones (25.01 with floating windows, 25.08 with Xwayland) address historical gaps. LWN's July 2025 coverage confirmed production readiness.

Q: Can I use my existing dotfiles from i3/Sway? Not directly—Niri uses KDL, not the i3 config format. However, the conceptual mapping is straightforward. Spend an afternoon translating; the paradigm shift is worth it. Community configs in awesome-niri accelerate migration.

Q: How do I handle floating windows? Since version 25.01, floating is fully supported. Use open-floating true in window rules, or toggle floating at runtime. Dialogs and utility windows work naturally; the scrollable strip is for your "real" work.

Q: Does Niri work with NVIDIA GPUs? Yes, reportedly fine. The Wayland NVIDIA situation has improved dramatically. If you encounter issues, the Matrix community actively troubleshoots proprietary driver quirks.

Q: What about gaming? Fullscreen games work normally—they bypass the tiling logic. For windowed games, the scrollable strip means your game maintains its intended resolution while other windows queue to the right. No more squished game windows beside tiny terminals.

Q: How does Niri compare to Hyprland's scrolling layout? Hyprland's scrolling layout is a plugin—optional, bolted-on, fighting the tree paradigm underneath. Niri's scrollability is architectural, fundamental, and inescapable. The difference in polish and consistency is night and day.

Q: Where do I get help? Matrix for real-time chat, Discord for community discussion, and GitHub issues for bugs. The developer is actively responsive.

Conclusion: Your Windows Deserve Better

We've been tiling wrong for decades. The binary tree, the recursive split, the ever-shrinking pane—these were hacks around limited screen real estate, not solutions. Niri asks a bolder question: what if the screen wasn't the limit?

The infinite horizontal strip isn't a gimmick. It's a fundamental reimagining of how spatial memory works, how context flows, how productivity feels when your tools stop fighting you. Every monitor isolated. Every window preserved. Every scroll intentional.

Is Niri perfect? No compositor is. But it's the most coherent vision in window management today—built by someone who used the alternatives, felt the pain, and chose to solve it at the root. The Rust foundation promises safety and performance. The active development guarantees evolution. The growing community ensures survival.

Your dotfiles are a sunk cost. Your muscle memory is adaptable. The thirty minutes you'll spend configuring Niri will repay themselves in hours of unfrustrated work, in windows that behave, in a workflow that finally flows.

Stop resizing. Start scrolling. Get Niri now.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Recommended Prompts

View All