AgentSkillsCN

configuring-niri

当您需要配置 Niri 窗口管理器、编写 niri 配置文件、设置快捷键、窗口规则、动画效果,或排查 Niri 相关问题时,此技能同样能为您提供详尽的参考文档指引。

SKILL.md
--- frontmatter
name: configuring-niri
description: Use when configuring Niri window manager, writing niri config files, setting up keybindings, window rules, animations, or troubleshooting Niri issues - navigates comprehensive reference documentation

Configuring Niri

Niri is a scrollable-tiling Wayland compositor. This skill navigates the complete Niri documentation to answer configuration questions.

Config location: ~/.config/niri/config.kdl (KDL syntax, live-reloaded)

Commands: niri validate (check config) | niri msg action reload-config (force reload)

How to Use This Skill

  1. Identify user intent from the topic index below
  2. Read the relevant doc file(s) from the docs/ subdirectory (paths are relative to this skill's directory)
  3. Answer using the documentation content

Always read docs before answering - don't rely on general knowledge about Niri.

Topic Index

Configuration Sections (config.kdl blocks)

User asks about...Read this fileConfig block
Keyboard shortcuts, hotkeys, bindsdocs/Configuration:-Key-Bindings.mdbinds {}
Mouse, touchpad, tablet, sensitivitydocs/Configuration:-Input.mdinput {}
Monitors, displays, resolution, scaledocs/Configuration:-Outputs.mdoutput "name" {}
Window gaps, columns, sizing, bordersdocs/Configuration:-Layout.mdlayout {}
Per-app settings, opacity, floatingdocs/Configuration:-Window-Rules.mdwindow-rule {}
Animations, easing, durationdocs/Configuration:-Animations.mdanimations {}
Touchpad/touchscreen gesturesdocs/Configuration:-Gestures.mdgestures {}
Layer shell, panels, barsdocs/Configuration:-Layer-Rules.mdlayer-rule {}
Named/persistent workspacesdocs/Configuration:-Named-Workspaces.mdworkspace {}
Lid close, tablet mode switchdocs/Configuration:-Switch-Events.mdswitch-events {}
Alt-tab, window switchingdocs/Configuration:-Recent-Windows.mdrecent-windows {}
Config splitting, modular configdocs/Configuration:-Include.mdinclude "file"
Debug, render, damage trackingdocs/Configuration:-Debug-Options.mddebug {}
Top-level flags (prefer-no-csd, etc)docs/Configuration:-Miscellaneous.md(top level)

Usage & Concepts

User asks about...Read this file
Installation, first setup, dependenciesdocs/Getting-Started.md
How workspaces work, workspace navigationdocs/Workspaces.md
Floating windows, how to floatdocs/Floating-Windows.md
Tabs, tabbed windowsdocs/Tabs.md
Fullscreen, maximize behaviordocs/Fullscreen-and-Maximize.md
Gestures overview (not config)docs/Gestures.md
Screen recording, OBS, pipewiredocs/Screencasting.md
IPC, niri msg, scriptingdocs/IPC.md
Systemd integration, autostartdocs/Example-systemd-Setup.md
Status bars, launchers, notificationsdocs/Important-Software.md
Layer shell panels (waybar, etc)docs/Layer‐Shell-Components.md

Troubleshooting

User asks about...Read this file
Common questions, how to Xdocs/FAQ.md
App-specific problems (Electron, etc)docs/Application-Issues.md
X11 apps, Steam, games, XWaylanddocs/Xwayland.md
Nvidia GPU issuesdocs/Nvidia.md
Fractional scaling issuesdocs/Fractional-Layout.md
Accessibility, screen readersdocs/Accessibility.md

Development (rarely needed)

TopicFile
Contributing to niridocs/Development:-Developing-niri.md
Design philosophydocs/Development:-Design-Principles.md
Animation internalsdocs/Development:-Animation-Timing.md

Examples

Shader examples for animations: docs/examples/

Keyword Quick Reference

Common search terms → doc file:

  • rounded corners, corner radiusConfiguration:-Window-Rules.md
  • CSD, client-side decorationsConfiguration:-Miscellaneous.md + FAQ.md
  • blurFAQ.md (not yet supported)
  • sticky, pinned, always on topFAQ.md (not yet supported)
  • hotkey overlay, startup popupFAQ.md
  • focus ring, border colorConfiguration:-Layout.md
  • spawn, exec, run commandConfiguration:-Key-Bindings.md
  • screenshotConfiguration:-Key-Bindings.md (look for screenshot action)
  • natural scroll, tap to clickConfiguration:-Input.md
  • HiDPI, 4K, scalingConfiguration:-Outputs.md
  • VRR, variable refreshConfiguration:-Outputs.md