niri-ipc

Control the Niri Wayland compositor via its IPC interface.

61|11|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/viralcode/openwhale --skill niri-ipc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: niri-ipc
Source: https://github.com/viralcode/openwhale/tree/main/skills/niri-ipc
Command: npx skills add https://github.com/viralcode/openwhale --skill niri-ipc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows agents to interact with the Niri Wayland compositor, enabling programmatic control over windows, workspaces, and outputs on Linux systems.

Core Features & Use Cases

  • Query Niri State: Get information about outputs, workspaces, windows, and the currently focused window.
  • Perform Actions: Focus or move windows, switch workspaces, reload Niri configuration, and spawn commands.
  • Use Case: An agent can use this skill to automatically arrange windows on specific workspaces, close unwanted applications, or launch new programs based on user requests or system events.

Quick Start

Use the niri.py script to get a list of all current windows.

Frequently Asked Questions about niri-ipc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I control the Niri Wayland compositor programmatically?

You can control the Niri Wayland compositor programmatically by sending commands via its IPC interface using `niri msg --json` or direct socket communication to query state and perform actions.

How do I query open windows and workspaces in Niri via IPC?

Querying Niri state via IPC allows you to retrieve information about active outputs, workspaces, windows, and the currently focused window by executing `niri msg --json` commands.

Can I use scripts to automatically switch workspaces and move windows in Niri?

Yes, you can use scripts to send IPC commands that focus or move windows, switch workspaces, spawn commands, and reload the Niri configuration automatically based on system events.

What environment setup is required to communicate with the Niri IPC socket?

To communicate with the Niri IPC socket, you must operate on a Linux system with the Niri compositor installed and the NIRI_SOCKET environment variable properly set.

Does the Niri IPC interface support reloading the compositor configuration?

Yes, the Niri IPC interface supports sending actions to reload the compositor configuration dynamically, allowing agents to apply new window management settings without restarting.

What is the best way to automate window management on a Linux Wayland compositor?

Automating window management on a Linux Wayland compositor is best achieved by utilizing the Niri IPC interface to programmatically query compositor state and execute window manipulation actions.