IPC: Commands and Controlπ
Triad talks through a Unix socket. Look at $XDG_RUNTIME_DIR/triad.sock. If itβs not there, check /tmp/triad.sock.
Send a command with the CLI:
triad msg <command> [arguments]
The Basicsπ
Ask Triad about its health and world.
| Command | Description |
|---|---|
commands | Lists what you can do. |
state | Dumps everything Triad knows. |
captures | Shows River v5 screencopy capture-session counts. |
workspaces, outputs, windows | Snippets of the state. |
perf-status, mem-status | Shows the daemon's guts. |
config-reload | Refreshes your settings. |
triad-reload | Snaps a restore point and restarts. |
Navigationπ
Move through your windows and tags.
| Command | Description |
|---|---|
focus-next / focus-prev | Shift focus. |
focus-left/right/up/down | Move focus spatially. |
focus-workspace <index> | Jump to a tag. |
new-workspace | Grab a fresh tag. |
toggle-overview | See the birdβs-eye view. |
toggle-scratchpad | Hide your mess. |
Layoutπ
Pick a shape for your windows.
| Command | Description |
|---|---|
scroller, grid, i3, dwindle | Choose a layout. |
switch-layout | Cycle your favorites. |
master-count, master-ratio | Command the master-stack. |
Advanced Shapesπ
- Notion: Use
frame-split-horizontalandframe-split-vertical. - BSP: Balance the tree with
bsp-balance. - i3: Traditional splits with
split-tree-split-horizontal.
Window Masteryπ
Control the clients.
| Command | Description |
|---|---|
close-window | Request a close. |
toggle-floating | Break the grid. |
fullscreen-window | Take it all. |
minimize / restore-minimized | Hide the focused window, then restore the most recently minimized window. |
move-to-tag <id> | Send a window away. |
group-windows | Bind neighbors together. |
restore-minimized restores one minimized window per invocation, newest first.
For Mango/DMS compatibility, minimized aliases minimize and
restore_minimized aliases restore-minimized.
The Systemπ
| Command | Description |
|---|---|
spawn | Run an app. |
screenshot | Capture the screen. |
lock-session | Guard your computer. |
exit-session | Quit Triad. |
rename-tag | Label your workspace. |
The Event Streamπ
Listen to Triadβs life in JSON.
triad msg event-stream
We broadcast WorkspaceActivated, WindowFocusChanged, and window lifecycle events.
Native JSONπ
Talk to Triad directly. Use the versioned JSON protocol over the socket.
Requestπ
{"triad":{"version":1,"request":"state"}}Actionπ
{"triad":{"version":1,"request":"action","action":"focus-workspace","workspace_idx":2}}Subscribeπ
{"triad":{"version":1,"request":"event-stream","events":["state","layout"]}}
We send a snapshot first, then push updates.
For capture indicators, subscribe to the native capture stream:
triad msg event-stream --native capture
Or use the bundled Waybar/custom-bar formatter:
sh tools/triad-capture-status.sh --watch --waybar
capture_sessions.windows always carries id, count, and known. When the
window is still known to Triad, the entry also includes app id, title,
workspace, tag, output name, and common window state flags.
On River window-management protocol v4, this payload remains present and empty,
and capabilities.capture_sessions is false.
Waybar custom module:
{
"custom/triad-capture": {
"exec": "sh /path/to/triad/tools/triad-capture-status.sh --watch --waybar",
"return-type": "json",
"format": "{}"
}
}