ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified system Safety 3/5

niri-ipc

Control the Niri Wayland compositor on Linux via its IPC (`niri msg --json` / $NIRI_SOCKET). Use when you need to query Niri state (outputs/workspaces/windows/focused window) or perform actions (focus/move/close windows, switch workspaces, spawn commands, reload config) from an OpenClaw agent running on a Niri session.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/atefr/niri-ipc
Or

What This Skill Does

The niri-ipc skill provides a robust interface for the OpenClaw AI agent to control the Niri Wayland compositor. It bridges the gap between natural language commands and the Niri IPC protocol, allowing the agent to manage desktop state, organize windows, and execute system commands natively. By leveraging either the bundled high-level Python wrappers or direct socket communication, the agent gains full administrative control over the user's workspace layout, focus behavior, and application lifecycle.

Installation

To integrate this skill into your OpenClaw environment, use the internal skill manager. Ensure you are running within an active Niri session, as the skill relies on the $NIRI_SOCKET environment variable to establish communication. Run the following command in your terminal:

clawhub install openclaw/skills/skills/atefr/niri-ipc

After installation, ensure the environment variables for your shell are configured correctly so that the Niri socket is accessible to the OpenClaw process.

Use Cases

  • Workspace Management: Automatically move windows to specific workspaces based on their content or your current workflow needs (e.g., "Move all terminal windows to workspace 3").
  • Focus Optimization: Quickly locate and bring specific applications to the foreground, such as switching to your browser during a research task.
  • System Automation: Reload configurations, close unresponsive windows, or spawn new processes directly through AI-driven commands.
  • Workspace Monitoring: Query the current state of outputs and windows to inform the agent's decision-making process regarding where to place new windows.

Example Prompts

  1. "Find the window matching 'firefox' and move it to my 'web' workspace."
  2. "Close the currently focused window if it is not my code editor."
  3. "Focus the second workspace and launch a new alacritty terminal instance there."

Tips & Limitations

  • Version Compatibility: Always ensure your version of the niri binary matches the compositor version. If you experience JSON parsing errors, restart the Niri compositor.
  • Socket Access: The skill requires read/write access to the Niri socket. If the agent cannot communicate, verify that $NIRI_SOCKET is correctly exported in the shell environment from which OpenClaw is launched.
  • Security: Because this skill can spawn processes and manipulate your window environment, ensure that you trust the OpenClaw instance and its prompts. Avoid allowing the agent to execute arbitrary shell commands if possible, preferring the built-in action wrappers.

Metadata

Author@atefr
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-atefr-niri-ipc": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#niri#wayland#linux#desktop-automation#ipc
Safety Score: 3/5

Flags: file-read, code-execution