Files
niri/Integrating-niri.html
T
2026-06-18 11:14:14 +00:00

1727 lines
38 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://niri-wm.github.io/niri/Integrating-niri.html">
<link rel="prev" href="Packaging-niri.html">
<link rel="next" href="Security-Model.html">
<link rel="icon" href="_assets/icons/logo.svg">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.15">
<title>Integrating niri - niri</title>
<link rel="stylesheet" href="assets/stylesheets/main.342714a4.min.css">
<link rel="stylesheet" href="assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="_assets/stylesheets/niri.css">
<script>__md_scope=new URL(".",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#configuration" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="." title="niri" class="md-header__button md-logo" aria-label="niri" data-md-component="logo">
<img src="_assets/icons/logo.svg" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
niri
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Integrating niri
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="indigo" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/niri-wm/niri" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="." title="niri" class="md-nav__button md-logo" aria-label="niri" data-md-component="logo">
<img src="_assets/icons/logo.svg" alt="logo">
</a>
niri
</label>
<div class="md-nav__source">
<a href="https://github.com/niri-wm/niri" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" checked>
<label class="md-nav__link" for="__nav_1" id="__nav_1_label" tabindex="0">
<span class="md-ellipsis">
Usage
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_1_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_1">
<span class="md-nav__icon md-icon"></span>
Usage
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="Getting-Started.html" class="md-nav__link">
<span class="md-ellipsis">
Getting Started
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Example-systemd-Setup.html" class="md-nav__link">
<span class="md-ellipsis">
Example systemd Setup
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Important-Software.html" class="md-nav__link">
<span class="md-ellipsis">
Important Software
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Workspaces.html" class="md-nav__link">
<span class="md-ellipsis">
Workspaces
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Floating-Windows.html" class="md-nav__link">
<span class="md-ellipsis">
Floating Windows
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Tabs.html" class="md-nav__link">
<span class="md-ellipsis">
Tabs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Overview.html" class="md-nav__link">
<span class="md-ellipsis">
Overview
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Screencasting.html" class="md-nav__link">
<span class="md-ellipsis">
Screencasting
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Layer%E2%80%90Shell-Components.html" class="md-nav__link">
<span class="md-ellipsis">
LayerShell Components
</span>
</a>
</li>
<li class="md-nav__item">
<a href="IPC.html" class="md-nav__link">
<span class="md-ellipsis">
IPC, niri msg
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Application-Issues.html" class="md-nav__link">
<span class="md-ellipsis">
Application-Specific Issues
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Nvidia.html" class="md-nav__link">
<span class="md-ellipsis">
Nvidia
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Xwayland.html" class="md-nav__link">
<span class="md-ellipsis">
Xwayland
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Gestures.html" class="md-nav__link">
<span class="md-ellipsis">
Gestures
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Fullscreen-and-Maximize.html" class="md-nav__link">
<span class="md-ellipsis">
Fullscreen and Maximize
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Window-Effects.html" class="md-nav__link">
<span class="md-ellipsis">
Window Effects
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Packaging-niri.html" class="md-nav__link">
<span class="md-ellipsis">
Packaging niri
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Integrating niri
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="Integrating-niri.html" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Integrating niri
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#configuration" class="md-nav__link">
<span class="md-ellipsis">
Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#xwayland" class="md-nav__link">
<span class="md-ellipsis">
Xwayland
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#keyboard-layout" class="md-nav__link">
<span class="md-ellipsis">
Keyboard layout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#autostart" class="md-nav__link">
<span class="md-ellipsis">
Autostart
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#screen-readers" class="md-nav__link">
<span class="md-ellipsis">
Screen readers
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#desktop-components" class="md-nav__link">
<span class="md-ellipsis">
Desktop components
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#security-model" class="md-nav__link">
<span class="md-ellipsis">
Security model
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="Security-Model.html" class="md-nav__link">
<span class="md-ellipsis">
Security Model
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Accessibility.html" class="md-nav__link">
<span class="md-ellipsis">
Accessibility
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Name-and-Logo.html" class="md-nav__link">
<span class="md-ellipsis">
Name and Logo
</span>
</a>
</li>
<li class="md-nav__item">
<a href="FAQ.html" class="md-nav__link">
<span class="md-ellipsis">
FAQ
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Configuration
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Configuration
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="Configuration%3A-Introduction.html" class="md-nav__link">
<span class="md-ellipsis">
Introduction
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Input.html" class="md-nav__link">
<span class="md-ellipsis">
Input
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Outputs.html" class="md-nav__link">
<span class="md-ellipsis">
Outputs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Key-Bindings.html" class="md-nav__link">
<span class="md-ellipsis">
Key Bindings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Switch-Events.html" class="md-nav__link">
<span class="md-ellipsis">
Switch Events
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Layout.html" class="md-nav__link">
<span class="md-ellipsis">
Layout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Named-Workspaces.html" class="md-nav__link">
<span class="md-ellipsis">
Named Workspaces
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Miscellaneous.html" class="md-nav__link">
<span class="md-ellipsis">
Miscellaneous
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Window-Rules.html" class="md-nav__link">
<span class="md-ellipsis">
Window Rules
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Layer-Rules.html" class="md-nav__link">
<span class="md-ellipsis">
Layer Rules
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Animations.html" class="md-nav__link">
<span class="md-ellipsis">
Animations
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Gestures.html" class="md-nav__link">
<span class="md-ellipsis">
Gestures
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Recent-Windows.html" class="md-nav__link">
<span class="md-ellipsis">
Recent Windows
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Debug-Options.html" class="md-nav__link">
<span class="md-ellipsis">
Debug Options
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Configuration%3A-Include.html" class="md-nav__link">
<span class="md-ellipsis">
Include
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
Development
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Development
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="Development%3A-Design-Principles.html" class="md-nav__link">
<span class="md-ellipsis">
Design Principles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Developing-niri.html" class="md-nav__link">
<span class="md-ellipsis">
Developing niri
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Documenting-niri.html" class="md-nav__link">
<span class="md-ellipsis">
Documenting niri
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Releasing-niri.html" class="md-nav__link">
<span class="md-ellipsis">
Releasing niri
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Fractional-Layout.html" class="md-nav__link">
<span class="md-ellipsis">
Fractional Layout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Redraw-Loop.html" class="md-nav__link">
<span class="md-ellipsis">
Redraw Loop
</span>
</a>
</li>
<li class="md-nav__item">
<a href="Development%3A-Animation-Timing.html" class="md-nav__link">
<span class="md-ellipsis">
Animation Timing
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#configuration" class="md-nav__link">
<span class="md-ellipsis">
Configuration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#xwayland" class="md-nav__link">
<span class="md-ellipsis">
Xwayland
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#keyboard-layout" class="md-nav__link">
<span class="md-ellipsis">
Keyboard layout
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#autostart" class="md-nav__link">
<span class="md-ellipsis">
Autostart
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#screen-readers" class="md-nav__link">
<span class="md-ellipsis">
Screen readers
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#desktop-components" class="md-nav__link">
<span class="md-ellipsis">
Desktop components
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#security-model" class="md-nav__link">
<span class="md-ellipsis">
Security model
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/niri-wm/niri/edit/main/docs/wiki/Integrating-niri.md" title="Edit this page" class="md-content__button md-icon" rel="edit">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
</a>
<h1>Integrating niri</h1>
<p>This page contains various bits of information helpful for integrating niri in a distribution.
First, for creating a niri package, see the <a href="Packaging-niri.html">Packaging</a> page.</p>
<h3 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">#</a></h3>
<p>Niri will load configuration from <code>$XDG_CONFIG_HOME/niri/config.kdl</code> or <code>~/.config/niri/config.kdl</code>, falling back to <code>/etc/niri/config.kdl</code>.
If both of these files are missing, niri will create <code>$XDG_CONFIG_HOME/niri/config.kdl</code> with the contents of <a href="https://github.com/niri-wm/niri/blob/main/resources/default-config.kdl">the default configuration file</a>, which are embedded into the niri binary at build time.</p>
<p>This means that you can customize your distribution defaults by creating <code>/etc/niri/config.kdl</code>.
When this file is present, niri <em>will not</em> automatically create a config at <code>~/.config/niri/</code>, so you'll need to direct your users how to do it themselves.</p>
<p>Keep in mind that we update the default config in new releases, so if you have a custom <code>/etc/niri/config.kdl</code>, you likely want to inspect and apply the relevant changes too.</p>
<p>The default configuration locations can be overridden with the <code>NIRI_CONFIG</code> environment variable.</p>
<p><span class="badge"><a href="https://github.com/niri-wm/niri/releases/tag/v26.04">Since: 26.04</a></span> You can also change the configuration path at runtime via the niri IPC or using the command <code>niri msg action load-config-file --path &lt;path-to-config.kdl&gt;</code>.</p>
<p><span class="badge"><a href="https://github.com/niri-wm/niri/releases/tag/v25.11">Since: 25.11</a></span> You can split the niri config file into multiple files using <a href="Configuration%3A-Include.html"><code>include</code></a>.</p>
<h3 id="xwayland">Xwayland<a class="headerlink" href="#xwayland" title="Permanent link">#</a></h3>
<p>Xwayland is required for running X11 apps and games, and also the Orca screen reader.</p>
<p><span class="badge"><a href="https://github.com/niri-wm/niri/releases/tag/v25.08">Since: 25.08</a></span> Niri integrates with <a href="https://github.com/Supreeeme/xwayland-satellite">xwayland-satellite</a> out of the box.
The integration requires xwayland-satellite &gt;= 0.7 available in <code>$PATH</code>.
Please consider making niri depend on (or at least recommend) the xwayland-satellite package.
If you had a custom config which manually started <code>xwayland-satellite</code> and set <code>$DISPLAY</code>, you should remove those customizations for the automatic integration to work.</p>
<p>You can change the path where niri looks for xwayland-satellite using the <a href="Configuration%3A-Miscellaneous.html#xwayland-satellite"><code>xwayland-satellite</code> top-level option</a>.</p>
<h3 id="keyboard-layout">Keyboard layout<a class="headerlink" href="#keyboard-layout" title="Permanent link">#</a></h3>
<p><span class="badge"><a href="https://github.com/niri-wm/niri/releases/tag/v25.08">Since: 25.08</a></span> By default (unless <a href="Configuration%3A-Input.html#layout">manually configured</a> otherwise), niri reads keyboard layout settings from systemd-localed at <code>org.freedesktop.locale1</code> over D-Bus.
Make sure your system installer sets the keyboard layout via systemd-localed, and niri should pick it up.</p>
<h3 id="autostart">Autostart<a class="headerlink" href="#autostart" title="Permanent link">#</a></h3>
<p>Niri works with the normal systemd autostart.
The default <a href="https://github.com/niri-wm/niri/blob/main/resources/niri.service">niri.service</a> brings up <code>graphical-session.target</code> as well as <code>xdg-desktop-autostart.target</code>.</p>
<p>To make a program run at niri startup without editing the niri config, you can either link its .desktop to <code>~/.config/autostart/</code>, or use a .service file with <code>WantedBy=graphical-session.target</code>.
See the <a href="Example-systemd-Setup.html">example systemd setup</a> page for some examples.</p>
<p>If this is inconvenient, you can also add <a href="Configuration%3A-Miscellaneous.html#spawn-at-startup"><code>spawn-at-startup</code></a> lines in the niri config.</p>
<h3 id="screen-readers">Screen readers<a class="headerlink" href="#screen-readers" title="Permanent link">#</a></h3>
<p><span class="badge"><a href="https://github.com/niri-wm/niri/releases/tag/v25.08">Since: 25.08</a></span> Niri works with the <a href="https://orca.gnome.org">Orca</a> screen reader.
Please see the <a href="Accessibility.html">Accessibility</a> page for details and advice for accessibility-focused distributions.</p>
<h3 id="desktop-components">Desktop components<a class="headerlink" href="#desktop-components" title="Permanent link">#</a></h3>
<p>You very likely want to run at least a notification daemon, portals, and an authentication agent.
This is detailed on the <a href="Important-Software.html">Important Software</a> page.</p>
<p>On top of that, you may want to preconfigure some desktop shell components to make the experience less barebones.
Niri's default config spawns <a href="https://github.com/Alexays/Waybar">Waybar</a>, which is a good starting point, but you may want to consider changing its default configuration to be less of a kitchen sink, and adding the <code>niri/workspaces</code> module.
You will probably also want a desktop background tool (<a href="https://github.com/swaywm/swaybg">swaybg</a> or <a href="https://codeberg.org/LGFae/awww/">awww (which used to be swww)</a>), and a nicer screen locker (compared to the default <code>swaylock</code>), like <a href="https://github.com/hyprwm/hyprlock/">hyprlock</a>.</p>
<p>Alternatively, some desktop environments and shells work with niri, and can give a more cohesive experience in one package:</p>
<ul>
<li><a href="https://lxqt-project.org/">LXQt</a> officially supports niri, see <a href="https://lxqt-project.org/wiki/Wayland-Session">their wiki</a> for details on setting it up.</li>
<li>Many <a href="https://www.xfce.org/">XFCE</a> components work on Wayland, including niri. See <a href="https://wiki.xfce.org/releng/wayland_roadmap#component_specific_status">their wiki</a> for details.</li>
<li>There are complete desktop shells based on Quickshell that support niri, for example <a href="https://github.com/AvengeMedia/DankMaterialShell">DankMaterialShell</a> and <a href="https://github.com/noctalia-dev/noctalia-shell">Noctalia</a>.</li>
<li>You can run a <a href="https://system76.com/cosmic/">COSMIC</a> session with niri using <a href="https://github.com/Drakulix/cosmic-ext-extra-sessions">cosmic-ext-extra-sessions</a>.</li>
</ul>
<h3 id="security-model">Security model<a class="headerlink" href="#security-model" title="Permanent link">#</a></h3>
<p>See the <a href="Security-Model.html">Security Model</a> page for an overview of niri's security model.</p>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": ".", "features": ["navigation.instant", "search.suggest", "content.code.copy", "content.action.edit"], "search": "assets/javascripts/workers/search.d50fe291.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="assets/javascripts/bundle.56ea9cef.min.js"></script>
</body>
</html>