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.

CommandDescription
commandsLists what you can do.
stateDumps everything Triad knows.
capturesShows River v5 screencopy capture-session counts.
workspaces, outputs, windowsSnippets of the state.
perf-status, mem-statusShows the daemon's guts.
config-reloadRefreshes your settings.
triad-reloadSnaps a restore point and restarts.

Move through your windows and tags.

CommandDescription
focus-next / focus-prevShift focus.
focus-left/right/up/downMove focus spatially.
focus-workspace <index>Jump to a tag.
new-workspaceGrab a fresh tag.
toggle-overviewSee the bird’s-eye view.
toggle-scratchpadHide your mess.

LayoutπŸ”—

Pick a shape for your windows.

CommandDescription
scroller, grid, i3, dwindleChoose a layout.
switch-layoutCycle your favorites.
master-count, master-ratioCommand the master-stack.

Advanced ShapesπŸ”—

  • Notion: Use frame-split-horizontal and frame-split-vertical.
  • BSP: Balance the tree with bsp-balance.
  • i3: Traditional splits with split-tree-split-horizontal.

Window MasteryπŸ”—

Control the clients.

CommandDescription
close-windowRequest a close.
toggle-floatingBreak the grid.
fullscreen-windowTake it all.
minimize / restore-minimizedHide the focused window, then restore the most recently minimized window.
move-to-tag <id>Send a window away.
group-windowsBind 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πŸ”—

CommandDescription
spawnRun an app.
screenshotCapture the screen.
lock-sessionGuard your computer.
exit-sessionQuit Triad.
rename-tagLabel 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": "{}"
  }
}