From Engineer to Power User: Adopting and Customizing the niri Compositor
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.
| Action | Keybinding | Description |
| Launch Terminal | Mod + T | Opens the default terminal (e.g., Alacritty). |
| Launch Launcher | Mod + D | Opens the application launcher (e.g., Fuzzel). |
| Close Focused Window | Mod + Shift + C | Closes the application. |
| Move Focus (Scroll) | Mod + Left/Right | Scrolls the workspace to the previous/next window. |
| Move Focus (Up/Down) | Mod + Up/Down | Moves focus between windows stacked in a column. |
| Move Window | Mod + Shift + Left/Right | Swaps the window's position with its neighbor. |
| Cycle Window Width | Mod + R | Cycles window width through preset sizes (e.g., 1/3, 1/2, 2/3). |
| Toggle Floating | Mod + F | Makes the focused window floating (for dialogs/popups). |
Exit niri | Mod + Shift + E | Displays 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