### Niri Getting Started Guide
Source: https://yalter.github.io/niri/Getting-Started
This guide covers the initial setup and getting started with the niri window manager, including support for different desktop environments, hardware configurations, and operating systems.
```markdown
Getting Started:
* Desktop environments
* NVIDIA
* Asahi, ARM, and other kmsro devices
* Nix/NixOS
* Virtual Machines
* Main Default Hotkeys
* Building
* NixOS/Nix
* Manual Installation
```
--------------------------------
### Niri Usage Guide
Source: https://yalter.github.io/niri/Development%3A-Design-Principles
Provides instructions and examples for using Niri, including getting started, systemd setup, workspaces, floating windows, tabs, screencasting, and Layer-Shell integration.
```markdown
Usage
* Getting Started
* Example systemd Setup
* Important Software
* Workspaces
* Floating Windows
* Tabs
* Overview
* Screencasting
* Layer‐Shell Components
* IPC, niri msg
* Application-Specific Issues
* Nvidia
* Xwayland
* Gestures
* Packaging niri
* FAQ
```
--------------------------------
### Niri Usage and Features
Source: https://yalter.github.io/niri/Overview
This section covers the usage of the Niri window manager, including getting started, example systemd setup, important software, workspaces, floating windows, tabs, screencasting, layer-shell components, IPC, application-specific issues, Nvidia, Xwayland, and gestures.
```markdown
- [ Getting Started ](https://yalter.github.io/niri/Getting-Started.html)
- [ Example systemd Setup ](https://yalter.github.io/niri/Example-systemd-Setup.html)
- [ Important Software ](https://yalter.github.io/niri/Important-Software.html)
- [ Workspaces ](https://yalter.github.io/niri/Workspaces.html)
- [ Floating Windows ](https://yalter.github.io/niri/Floating-Windows.html)
- [ Tabs ](https://yalter.github.io/niri/Tabs.html)
- Overview [ Overview ](https://yalter.github.io/niri/Overview.html)
* [ Overview ](https://yalter.github.io/niri/Overview.html#overview)
* [ Configuration ](https://yalter.github.io/niri/Overview.html#configuration)
* [ Backdrop customization ](https://yalter.github.io/niri/Overview.html#backdrop-customization)
- [ Screencasting ](https://yalter.github.io/niri/Screencasting.html)
- [ Layer‐Shell Components ](https://yalter.github.io/niri/Layer%E2%80%90Shell-Components.html)
- [ IPC, niri msg ](https://yalter.github.io/niri/IPC.html)
- [ Application-Specific Issues ](https://yalter.github.io/niri/Application-Issues.html)
- [ Nvidia ](https://yalter.github.io/niri/Nvidia.html)
- [ Xwayland ](https://yalter.github.io/niri/Xwayland.html)
- [ Gestures ](https://yalter.github.io/niri/Gestures.html)
- [ Packaging niri ](https://yalter.github.io/niri/Packaging-niri.html)
- [ FAQ ](https://yalter.github.io/niri/FAQ.html)
```
--------------------------------
### Niri Usage and Configuration Overview
Source: https://yalter.github.io/niri/index
Provides an overview of Niri's usage, including getting started, example setups, and configuration details. It links to specific pages for deeper dives into each topic.
```Markdown
# Home
Welcome to the niri documentation!
Feel free to look through usage and [Getting started](https://yalter.github.io/niri/Getting-Started.html). If you're looking for ways to configure niri, check out the [introduction to configuration](https://yalter.github.io/niri/Configuration%3A-Introduction.html).
If you'd like to help with niri, there are plenty of both coding- and non-coding-related ways to do so. See [CONTRIBUTING.md](https://github.com/YaLTeR/niri/blob/main/CONTRIBUTING.md) for an overview.
If you're not already here, check out our new wiki website!
* * *
The documentation is open to contribution, see [Documenting niri](https://yalter.github.io/niri/Development%3A-Documenting-niri.html). Please discuss bigger changes in [our Matrix room](https://matrix.to/#/#niri:matrix.org) first! The wiki is generated from files in the `docs/wiki/` folder of the repository, so you can open a pull request modifying it there.
Made with [ Material for MkDocs ](https://squidfunk.github.io/mkdocs-material/)
```
--------------------------------
### Systemd Service for Swaybg
Source: https://yalter.github.io/niri/Example-systemd-Setup
Defines a systemd user service for swaybg to manage the background image. It specifies the graphical session target and the command to execute, including a customizable background image path.
```ini
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/swaybg -m fill -i "%h/Pictures/LakeSide.png"
Restart=on-failure
```
--------------------------------
### Add Swaybg to Niri Session
Source: https://yalter.github.io/niri/Example-systemd-Setup
Adds the custom swaybg.service as a dependency for niri.service, ensuring swaybg starts with the Niri session after its service file has been created and systemd reloaded.
```shell
systemctl --user add-wants niri.service swaybg.service
```
--------------------------------
### Add Swayidle to Niri Session
Source: https://yalter.github.io/niri/Example-systemd-Setup
Adds the custom swayidle.service as a dependency for niri.service, ensuring swayidle starts with the Niri session after its service file has been created and systemd reloaded.
```shell
systemctl --user add-wants niri.service swayidle.service
```
--------------------------------
### Add Mako and Waybar to Niri Session
Source: https://yalter.github.io/niri/Example-systemd-Setup
Adds mako.service and waybar.service as dependencies for niri.service, ensuring they start with the Niri session. These services are typically provided by the respective packages.
```shell
systemctl --user add-wants niri.service mako.service
systemctl --user add-wants niri.service waybar.service
```
--------------------------------
### Install Dependencies for Ubuntu
Source: https://yalter.github.io/niri/Getting-Started
Installs necessary dependencies for building Niri on Ubuntu 24.04 using apt.
```bash
sudo apt install build-essential pkg-config libx11-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libwayland-cursor-dev libseat-dev libliftoff-dev libdrm-dev libgbm-dev libegl1-mesa-dev libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxfixes-dev libglib2.0-dev libpango1.0-dev libgdk-pixbuf2.0-dev libglslang-dev libvulkan-dev vulkan-headers libxcb-render-util0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-damage0-dev libxcb-sync-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-composite0-dev libxcb-present-dev libxcb-randr0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-keysyms1-dev libxcb-util-dev libxcb-image0-dev libxcb-render0-dev libxcb-shape0
```
--------------------------------
### Notification Daemon Setup
Source: https://yalter.github.io/niri/Important-Software
This snippet shows how to set up a notification daemon, which is required by many applications. It suggests using 'mako' and provides options for systemd setup or using 'spawn-at-startup'.
```markdown
Many apps need one. For example, [mako](https://github.com/emersion/mako) works well. Use [a systemd setup](https://yalter.github.io/niri/Example-systemd-Setup.html) or [`spawn-at-startup`](https://yalter.github.io/niri/Configuration%3A-Miscellaneous.html#spawn-at-startup).
```
--------------------------------
### Running Programs Across Logout with systemd
Source: https://yalter.github.io/niri/Example-systemd-Setup
This section details how to configure systemd services to ensure programs continue running even after a user logs out. It typically involves creating a systemd user service unit.
```systemd
[Unit]
Description=My Persistent Program
[Service]
ExecStart=/path/to/your/program --arguments
Restart=always
[Install]
WantedBy=default.target
```
--------------------------------
### Starting Niri Session
Source: https://yalter.github.io/niri/Getting-Started
Commands to start the Niri Wayland compositor session, either through a systemd/dinit service or as a standalone process with environment variable import.
```Shell
niri-session
niri --session
```
--------------------------------
### Run Tmux in a Persistent Systemd Scope
Source: https://yalter.github.io/niri/Example-systemd-Setup
This command starts a new tmux session within a transient systemd scope. This ensures that the tmux session and any programs started within it will continue to run even after the user logs out of their Niri session.
```bash
systemd-run --user --scope tmux new-session
```
--------------------------------
### Systemd Service for Swayidle
Source: https://yalter.github.io/niri/Example-systemd-Setup
Defines a systemd user service for swayidle to manage screen locking and power management. It specifies dependencies on the graphical session and the command to execute for idle timeouts and before sleep events.
```ini
[Unit]
PartOf=graphical-session.target
After=graphical-session.target
Requisite=graphical-session.target
[Service]
ExecStart=/usr/bin/swayidle -w timeout 601 'niri msg action power-off-monitors' timeout 600 'swaylock -f' before-sleep 'swaylock -f'
Restart=on-failure
```
--------------------------------
### Niri Workspaces Example Workflow
Source: https://yalter.github.io/niri/Workspaces
Illustrates a practical example of how to use workspaces in Niri, demonstrating a common workflow for organizing and switching between different task environments.
```markdown
## Example workflow
This section provides a step-by-step example of a typical workspace usage pattern in Niri.
```
--------------------------------
### Niri Manual Installation File Destinations
Source: https://yalter.github.io/niri/Getting-Started
Specifies the recommended file destinations for Niri components during manual installation. Ensure the path to 'niri' in niri.service is correct, defaulting to '/usr/bin/niri'.
```bash
File | Destination
--|--
`target/release/niri` | `/usr/local/bin/`
`resources/niri-session` | `/usr/local/bin/`
`resources/niri.desktop` | `/usr/local/share/wayland-sessions/`
`resources/niri-portals.conf` | `/usr/local/share/xdg-desktop-portal/`
`resources/niri.service` (systemd) | `/etc/systemd/user/`
`resources/niri-shutdown.target` (systemd) | `/etc/systemd/user/`
`resources/dinit/niri` (dinit) | `/etc/dinit.d/user/`
`resources/dinit/niri-shutdown` (dinit) | `/etc/dinit.d/user/`
```
--------------------------------
### NixOS Flake for Niri
Source: https://yalter.github.io/niri/Getting-Started
Reference to a NixOS Flake for installing and managing Niri on NixOS systems.
```Nix
# NixOS Flake for Niri installation
# (Refer to external repository for details)
# Example usage (conceptual):
# nixos-modules.niri.enable = true;
```
--------------------------------
### Niri Window Rule Configuration Example
Source: https://yalter.github.io/niri/Configuration%3A-Window-Rules
An example of a Niri window rule that matches all Telegram windows except the media viewer and applies the 'open-on-output' property.
```Niri Configuration
window-rule{
matchapp-id=r"^org\.telegram\.desktop$"
excludetitle="^Media viewer$"
open-on-output"HDMI-A-1"
}
```
--------------------------------
### XKB Key Detection Example
Source: https://yalter.github.io/niri/Configuration%3A-Key-Bindings
An example output from the `wev` tool, illustrating how to identify XKB key names. The `sym` field shows the key name (e.g., 'Left', 'Right') corresponding to the pressed key.
```Terminal Output
[14: wl_keyboard] key: serial: 757775; time: 44940343; key: 113; state: 1 (pressed)
sym: Left (65361), utf8: ''
[14: wl_keyboard] key: serial: 757776; time: 44940432; key: 113; state: 0 (released)
sym: Left (65361), utf8: ''
[14: wl_keyboard] key: serial: 757777; time: 44940753; key: 114; state: 1 (pressed)
sym: Right (65363), utf8: ''
[14: wl_keyboard] key: serial: 757778; time: 44940846; key: 114; state: 0 (released)
sym: Right (65363), utf8: ''
```
--------------------------------
### Niri Layer Rule Configuration Example
Source: https://yalter.github.io/niri/Configuration%3A-Layer-Rules
An example demonstrating the structure and properties of a Niri layer rule. This includes matching conditions and various visual properties that can be applied to layer-shell surfaces.
```Niri Configuration
layer-rule{
matchnamespace="waybar"
matchat-startup=true
// Properties that apply continuously.
opacity0.5
block-out-from"screencast"
// block-out-from "screen-capture"
shadow{
on
// off
softness40
spread5
offsetx=0y=5
draw-behind-windowtrue
color"#00000064"
// inactive-color "#00000064"
}
geometry-corner-radius12
place-within-backdroptrue
baba-is-floattrue
}
```
--------------------------------
### Configure xwayland-satellite and DISPLAY in Niri
Source: https://yalter.github.io/niri/Xwayland
This configuration block shows how to automatically start xwayland-satellite on system startup and set the DISPLAY environment variable for all applications within the niri configuration file.
```toml
spawn-at-startup"xwayland-satellite"
// Or, if you built it by hand:
// spawn-at-startup "~/path/to/code/target/release/xwayland-satellite"
environment{
DISPLAY":0"
}
```
--------------------------------
### Niri Development Guide
Source: https://yalter.github.io/niri/Development%3A-Design-Principles
Outlines the development process for Niri, including design principles, how to contribute to development, documentation, fractional layout, the redraw loop, and animation timing.
```markdown
Development
* Design Principles
* Developing niri
* Documenting niri
* Fractional Layout
* Redraw Loop
* Animation Timing
```
--------------------------------
### Spawn Processes at Startup
Source: https://yalter.github.io/niri/Configuration%3A-Miscellaneous
Configure Niri to spawn specified programs when the system starts. This option accepts a path to the program binary and its arguments, mirroring the functionality of the `spawn` key binding action.
```toml
spawn-at-startup"waybar"
spawn-at-startup"alacritty"
```
--------------------------------
### GitHub-Style Admonition
Source: https://yalter.github.io/niri/Development%3A-Documenting-niri
Example of how to write an admonition (alert) in markdown, following GitHub's syntax. This is used for highlighting important information.
```markdown
[!IMPORTANT]
This is an important distinction from other `mkdocs`-based documentation you might have encountered.
```
--------------------------------
### Match Windows at Startup
Source: https://yalter.github.io/niri/Configuration%3A-Window-Rules
Applies rules to windows within the first 60 seconds after Niri starts. This is useful for initial window placement or configuration, such as opening specific windows on designated monitors upon startup.
```niri-config
// Open windows on the HDMI-A-1 monitor at niri startup, but not afterwards.
window-rule{
matchat-startup=true
open-on-output"HDMI-A-1"
}
```
--------------------------------
### Niri Output Configuration Example
Source: https://yalter.github.io/niri/Configuration%3A-Outputs
Demonstrates the structure for configuring individual display outputs in Niri. This includes setting resolution, refresh rate, scaling, transformations, positioning, variable refresh rate, focus behavior, and colors.
```toml
output"eDP-1"{
mode"1920x1080@120.030"
scale2.0
transform"90"
positionx=1280y=0
variable-refresh-rate
focus-at-startup
background-color"#003300"
backdrop-color"#001100"
}
output"HDMI-A-1"{
// ...settings for HDMI-A-1...
}
output"Some Company CoolMonitor 1234"{
// ...settings for CoolMonitor...
}
```
--------------------------------
### Using xwayland-run
Source: https://yalter.github.io/niri/Xwayland
The `xwayland-run` utility simplifies running X11 applications by automating the setup of a dedicated Xwayland server, DISPLAY variable, and xauth. It automatically closes the Xwayland server when the X11 client terminates.
```bash
xwayland-run -- your-x11-app
```
```bash
xwayland-run -geometry 800x600 -fullscreen -- wine wingame.exe
```
--------------------------------
### Niri Window Rule Matchers and Properties
Source: https://yalter.github.io/niri/Configuration%3A-Window-Rules
Provides a comprehensive example of a Niri window rule, illustrating various matchers to identify specific windows and properties to control their behavior upon opening and continuously.
```Niri Configuration
window-rule{
matchtitle="Firefox"
matchapp-id="Alacritty"
matchis-active=true
matchis-focused=false
matchis-active-in-column=true
matchis-floating=true
matchis-window-cast-target=true
matchis-urgent=true
matchat-startup=true
default-column-width{ proportion0.75;}
default-window-height{ fixed500;}
open-on-output"Some Company CoolMonitor 1234"
open-on-workspace"chat"
open-maximizedtrue
open-fullscreentrue
open-floatingtrue
open-focusedfalse
draw-border-with-backgroundfalse
opacity0.5
block-out-from"screencast"
variable-refresh-ratetrue
default-column-display"tabbed"
}
```
--------------------------------
### Niri FAQ: Hide Startup Pop-up
Source: https://yalter.github.io/niri/FAQ
This FAQ entry explains how to hide the 'Important Hotkeys' pop-up that appears at the start of Niri. It's a user preference for a cleaner startup experience.
```en
How to hide the "Important Hotkeys" pop-up at the start?
```
--------------------------------
### Match at Startup in Layer Rules
Source: https://yalter.github.io/niri/Configuration%3A-Layer-Rules
Configures a layer rule to apply only during the initial startup phase of Niri (first 60 seconds). This example sets opacity for surfaces matching the condition.
```Niri Configuration
layer-rule{
matchat-startup=true
opacity0.5
}
```
--------------------------------
### Niri FAQ: Bitwarden Floating Window
Source: https://yalter.github.io/niri/FAQ
This FAQ entry provides specific instructions on how to configure the Bitwarden window in Firefox to open as a floating window in Niri. It's an example of applying window rules.
```en
How do I make the Bitwarden window in Firefox open as floating?
```
--------------------------------
### Niri Development Information
Source: https://yalter.github.io/niri/Overview
This section provides information for developers working on Niri, including design principles, development guides, documentation practices, fractional layout, the redraw loop, and animation timing.
```markdown
- [ Design Principles ](https://yalter.github.io/niri/Development%3A-Design-Principles.html)
- [ Developing niri ](https://yalter.github.io/niri/Development%3A-Developing-niri.html)
- [ Documenting niri ](https://yalter.github.io/niri/Development%3A-Documenting-niri.html)
- [ Fractional Layout ](https://yalter.github.io/niri/Development%3A-Fractional-Layout.html)
- [ Redraw Loop ](https://yalter.github.io/niri/Development%3A-Redraw-Loop.html)
- [ Animation Timing ](https://yalter.github.io/niri/Development%3A-Animation-Timing.html)
```
--------------------------------
### Direct Xwayland Execution with Window Manager
Source: https://yalter.github.io/niri/Xwayland
This method involves running Xwayland directly and managing X11 windows within it using a separate X11 window manager. It requires manually starting Xwayland, an X11 WM, and X11 applications, and configuring clipboard sharing.
```bash
Xwayland
env DISPLAY=:0 i3
env DISPLAY=:0 flatpak run com.valvesoftware.Steam
```
```bash
env DISPLAY=:0 xsel -ob | wl-copy
```
```bash
wl-paste -n | env DISPLAY=:0 xsel -ib
```
--------------------------------
### Niri Window Rule Example
Source: https://yalter.github.io/niri/Configuration%3A-Window-Rules
Demonstrates setting a default window rule to open all windows maximized, and then overriding it for Alacritty to not open maximized. This showcases the order-dependent nature of window rule processing.
```Niri Configuration
window-rule{
open-maximizedtrue
}
window-rule{
matchapp-id="Alacritty"
open-maximizedfalse
}
```
--------------------------------
### Modifying Desktop Entry for Cage Integration
Source: https://yalter.github.io/niri/Xwayland
This example shows how to modify an application's desktop entry file to prefix the `Exec` property with `cage --` to launch the application within a Cage Wayland session.
```ini
[Desktop Entry]
Type=Application
Name=Spotify
GenericName=Online music streaming service
Comment=Access all of your favorite music
Icon=com.spotify.Client
Exec=cage -- flatpak run com.spotify.Client
Terminal=false
```
--------------------------------
### Run a Program with Spawn
Source: https://yalter.github.io/niri/Configuration%3A-Key-Bindings
Demonstrates the basic usage of the 'spawn' command to run programs and pass arguments. Each argument must be provided as a separate string.
```Niri Configuration
binds{
// Run alacritty.
Mod+T{ spawn"alacritty";}
// Run `wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+`.
XF86AudioRaiseVolume{ spawn"wpctl""set-volume""@DEFAULT_AUDIO_SINK@""0.1+";}
}
```
--------------------------------
### Packaging niri Overview
Source: https://yalter.github.io/niri/Packaging-niri
Provides an overview of packaging the niri compositor. This includes details on running tests, managing version strings, handling panics, and managing Rust dependencies.
```Markdown
# Packaging niri
```
--------------------------------
### Niri Configuration Introduction
Source: https://yalter.github.io/niri/Getting-Started
API documentation for Niri configuration, outlining the structure and linking to detailed documentation for various options.
```APIDOC
Configuration Introduction:
- Provides an overview of Niri's configuration system.
- Links to detailed documentation for all configuration options.
- Recommended for users wanting to customize Niri's behavior.
Related Pages:
- Configuration: Keybindings
- Configuration: Appearance
- Configuration: Workspaces
```
--------------------------------
### Niri Configuration Loading
Source: https://yalter.github.io/niri/Configuration%3A-Introduction
Explains how niri loads its configuration files. This includes the order of loading and how default configurations are applied.
```markdown
## Loading
niri loads configuration files from `~/.config/niri/config` by default. If this file does not exist, niri will use its built-in default configuration.
```
--------------------------------
### Hide Hotkey Overlay at Startup
Source: https://yalter.github.io/niri/FAQ
Configures Niri to skip the display of the 'Important Hotkeys' pop-up window when the compositor starts.
```configuration
hotkey-overlay{
skip-at-startup
}
```
--------------------------------
### Rust Result Iteration Example
Source: https://yalter.github.io/niri/niri_ipc/type
Demonstrates iterating over a mutable Result, modifying the Ok value, and handling the Err case.
```rust
let mut x: Result = Ok(7);
match x.iter_mut().next() {
Some(v) => *v = 40,
None => {},
}
assert_eq!(x, Ok(40));
let mut x: Result = Err("nothing!");
assert_eq!(x.iter_mut().next(), None);
```
--------------------------------
### Serving Documentation Site Locally with uv
Source: https://yalter.github.io/niri/Development%3A-Documenting-niri
Instructions on how to serve the niri documentation site locally using the 'uv' tool. This is useful for developers who want to preview changes to the documentation before deploying them.
```markdown
[ Serving the site locally with uv ](https://yalter.github.io/niri/Development%3A-Documenting-niri.html#serving-the-site-locally-with-uv)
```