From Engineer to Power User: Adopting and Customizing the niri Compositor


From Engineer to Power User: Adopting and Customizing the niri Compositor

YaLTeR/niri

2025-10-09

niri is a relatively new, highly-polished Wayland compositor written in Rust. It stands out from traditional tiling window managers like i3 or Sway due to its unique "scrollable-tiling" model.

As a software engineer, your workflow often involves managing a large number of applications
an IDE, multiple terminals, browsers for documentation, API clients, and more. niri can significantly boost your productivity and focus by addressing common pain points of traditional window managers

In traditional tiling WMs, every time you open or close a window, all other windows on the screen are automatically resized. This can be jarring and disruptive to your focus.

niri's Advantage
Windows are placed in an "infinite" horizontal strip on your workspace. When you open a new window, existing windows keep their original size. You simply "scroll" horizontally (or move focus) to bring the next window into view. This creates a much more stable and predictable environment for tasks like coding or debugging.

The scrollable nature allows you to keep an unlimited number of windows on a single dynamic workspace, making them feel like a continuous train of thought.

Software Engineer Use Case
Dedicate one workspace to a specific project or task (e.g., "Feature X Development"). You can have your code editor, a couple of terminal panes, and a browser with the relevant documentation all lined up. When you switch to a different project/workspace, your entire context for the previous task is perfectly preserved and organized for when you scroll back to it.

niri is built in Rust, a language known for its focus on safety, speed, and concurrency.

Engineer Utility
This translates to a compositor that is generally highly stable, fast, and resource-efficient. You can worry less about your window manager crashing and more about your code. It uses the smithay library instead of the more common wlroots, offering a different, modern, and high-performance foundation.

niri treats multi-monitor setups as a core part of its design, with each display having its own separate set of dynamic workspaces. It also supports Mixed DPI environments and Fractional Scaling while keeping the niri UI pixel-perfect.

Engineer Utility
Essential for modern development setups. You can have your main coding workspace on one monitor and a completely separate set of workspaces (e.g., a documentation browser and a video meeting window) on another, with the correct scaling for each.

Like most advanced WMs, niri supports Inter-Process Communication (IPC).

Engineer Utility
This is crucial for automating your workflow. You can write simple shell scripts to query the state of your windows, move applications, open specific apps in specific configurations, or even implement your own tools like custom scratchpads (which are easily achievable using floating windows combined with IPC).

The easiest way to get started with niri is to install it using your distribution's package manager, as it is available in most popular repos (or through community efforts).

Check Your Distribution
niri is often available as the niri package.

Arch/EndeavourOS

# Install niri and some recommended utilities
sudo pacman -S niri fuzzel alacritty xdg-desktop-portal-gnome

NixOS
Available via a NixOS Flake.

Fedora
Available via COPR.

Start niri

Log out of your current session.

On your Display Manager (GDM, LightDM, SDDM, etc.), select "Niri" from the session list before logging in.

Alternatively, for a TTY (console) start, you can execute

niri-session

niri is highly keyboard-driven, using the Super key (usually the Windows key) as the main modifier, often called Mod.

ActionKeybindingDescription
Launch TerminalMod + TOpens the default terminal (e.g., Alacritty).
Launch LauncherMod + DOpens the application launcher (e.g., Fuzzel).
Close Focused WindowMod + Shift + CCloses the application.
Move Focus (Scroll)Mod + Left/RightScrolls the workspace to the previous/next window.
Move Focus (Up/Down)Mod + Up/DownMoves focus between windows stacked in a column.
Move WindowMod + Shift + Left/RightSwaps the window's position with its neighbor.
Cycle Window WidthMod + RCycles window width through preset sizes (e.g., 1/3, 1/2, 2/3).
Toggle FloatingMod + FMakes the focused window floating (for dialogs/popups).
Exit niriMod + Shift + EDisplays the exit confirmation dialog.

The power of niri for an engineer often comes down to its configuration file and IPC usage. The configuration is typically a TOML file located at ~/.config/niri/config.toml.

You can easily set up a custom keybinding to launch a specific development tool, like a web browser pointed at a local host, or a dedicated chat application on a floating layer.

In your ~/.config/niri/config.toml

# To launch your favorite IDE (e.g., VS Code)
[[keybind]]
key = "v"
mods = ["Super"]
command = "code"

# To open a browser to a specific development environment URL
[[keybind]]
key = "w"
mods = ["Super", "Shift"]
command = ["sh", "-c", "google-chrome-stable http://localhost:8080/ &"]

While niri supports floating windows, you can combine this with IPC to create a script that behaves like a scratchpad—an application that can be instantly shown or hidden with a single keypress.

Set up the IPC keybind in config.toml to call a script (e.g., niri-scratchpad-toggle.sh)

# Keybind to toggle a dedicated terminal scratchpad
[[keybind]]
key = "s"
mods = ["Super"]
command = ["/usr/local/bin/niri-scratchpad-toggle.sh"]

Create the Scratchpad Script (/usr/local/bin/niri-scratchpad-toggle.sh)

This is a simplified conceptual example. Actual implementation would use niri's client (like niri-cli) for full IPC control.

#!/bin/bash

SCRATCHPAD_APP="alacritty --title scratchpad"
WINDOW_TITLE="scratchpad"

# Check if the scratchpad window is already open and focused
if niri-cli get-windows | grep -q "\"title\": \"$WINDOW_TITLE\"" ; then
    # If open, hide/move it off-screen (or minimize if niri supported minimizing)
    # With niri, a common IPC trick is to move it to a specific, otherwise unused workspace.
    # Alternatively, if it's open, you just hide it by moving focus to another window.
    # For simplicity, let's just close it for now in this concept:
    niri-cli focus-window title:"$WINDOW_TITLE"
    niri-cli close-window
else
    # If not open, launch it and set it as floating for an overlay effect
    $SCRATCHPAD_APP &
    # A small delay might be needed for the window to appear
    sleep 0.5
    niri-cli float-window title:"$WINDOW_TITLE"
    # Optional: Set a specific size and position
    # niri-cli set-size title:"$WINDOW_TITLE" 800 600
fi

YaLTeR/niri




Building Games with Bevy: A Rust-Based, Data-Driven Approach

Bevy is an open-source, data-driven game engine written in Rust. From a software engineer's perspective, Bevy's most significant benefit is its Entity Component System (ECS) architecture


Performance Meets Intelligence: Scaling AI Applications with ruvnet/ruvector

Since you’re looking at this from a software engineering perspective, let's break down why this stack is a powerhouse and how you can get it running


Beyond grep: Introducing ripgrep, the Blazing Fast, gitignore-Aware Search Tool

Here is a friendly, detailed explanation of how it can benefit you, how to install it, and some sample usage.ripgrep's primary benefit is its speed and its intelligent default behavior


Enhancing IDE Workflow with Custom AI Agents

A tool described as a "powerful GUI app and Toolkit for Claude Code" with features like "Create custom agents, manage interactive Claude Code sessions


A Developer's Perspective on vibe: Leveraging Rust for On-Device AI Transcription

Let's dive into thewh1teagle/vibe, a fascinating project that's right up our alley as software engineers. This tool, built with Rust


The Software Engineer's Take on Linera Protocol and Micro-Chains

Linera Protocol is a blockchain-agnostic sharded protocol. Think of it as a new way to build and scale decentralized applications (dApps) that focuses on speed and efficiency


High-Performance Algorithmic Trading with Nautilus Trader

At its core, Nautilus Trader is a powerful framework for building and running algorithmic trading strategies. Think of it as a toolkit that provides the essential components you need


Why You Should Self-Host RustDesk: A Developer's Perspective

RustDesk is super useful for a software engineer for a few key reasons, especially because it's self-hostable. This means you can run it on your own server


Pathway: A Python Framework for Real-Time Data and AI

As a software engineer, you'll find Pathway invaluable because it simplifies a lot of the complexities of stream processing