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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/atefr/niri-ipcWhat 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
- "Find the window matching 'firefox' and move it to my 'web' workspace."
- "Close the currently focused window if it is not my code editor."
- "Focus the second workspace and launch a new alacritty terminal instance there."
Tips & Limitations
- Version Compatibility: Always ensure your version of the
niribinary 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_SOCKETis 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
actionwrappers.
Metadata
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-atefr-niri-ipc": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, code-execution