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




Boost Productivity with cc-switch: Unified Configuration and Prompt Management for AI Coding Tools

cc-switch (farion1231/cc-switch) is a cross-platform desktop application written in Rust that acts as an All-in-One assistant tool for various AI-powered coding and development environments like Claude Code


Here are a few title options based on our previous conversation, formatted as requested:

This course is a goldmine for anyone wanting to learn Rust, especially those coming from a background in C++ or other low-level languages


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


Rust's Rewrite of Coreutils: Modern, Safe, and Cross-Platform Command-Line Tools

Think of uutils/coreutils as a modern, cross-platform replacement for the standard GNU core utilities you're probably used to on Linux


Why Hyperswitch? An Engineer's Deep Dive into Open-Source Payment Switching

Hyperswitch is an open-source payment switch built with Rust and leveraging Redis. In simple terms, it acts as a central hub for all your payment processing needs


Rust-Powered Desktop Apps from the Web: An Introduction to Pake

From a software engineer's perspective, Pake provides several key benefitsSpeed and Efficiency Instead of building a full-fledged desktop application from scratch with frameworks like Electron


Rust-Powered Performance: Why Czkawka is the Ultimate Tool for File Management

Czkawka (pronounced "tch-kav-ka, " which is Polish for "hiccup") is a fantastic example of a modern utility built with Rust


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


High-Performance Desktop Development: An Engineer's Guide to gpui-component in Rust

This project provides a set of reusable GUI components built on top of the GPUI (GPU User Interface) framework, all written in Rust


Unleashing Deep Learning with Rust's Burn Framework

Let's dive into tracel-ai/burn from a software engineer's perspective. This looks like a really interesting project, and I'll explain how it can be useful