IPC & Commandsπ
Triad communicates over a Unix socket at $XDG_RUNTIME_DIR/triad.sock (falls back to /tmp/triad.sock).
Send any command with:
triad msg <command> [arguments]
General & Diagnosticsπ
| Command | Description |
commands [--json] | List all available commands. |
validate <commandβ¦> | Validate a command locally without sending it. |
request <json> | Send a raw JSON IPC request. |
state | Print current session state as JSON. |
layout-state | Print layout state for all visible workspaces. |
perf-status | Print daemon performance and timing diagnostics. |
mem-status | Print memory diagnostics. |
config-reload | Reload the configuration file. |
triad-reload | Write a live-restore snapshot and restart the manager. |
dispatch-binding <kind> <chord> | Trigger a configured binding, e.g. key Super+Return. |
Navigationπ
| Command | Description |
focus-next / focus-prev | Shift focus to the next or previous window. |
focus-left / focus-right / focus-up / focus-down | Move focus spatially. |
focus-last | Return focus to the previously focused window. |
focus-workspace <index> | Focus a workspace by compact index. |
focus-tag <id> | Focus a workspace by stable tag ID. |
focus-window <id> | Focus a specific window by ID. |
new-workspace | Create and focus a new dynamic workspace. |
focus-tag-left / focus-tag-right | Move to the adjacent workspace. |
focus-occupied-tag-left / focus-occupied-tag-right | Skip empty workspaces. |
focus-column-first / focus-column-last | Jump to the first or last column in the scroller. |
toggle-overview | Toggle the bird's-eye workspace view. |
recent-window-next / recent-window-prev | Navigate the MRU switcher. |
recent-window-confirm / recent-window-cancel | Confirm or cancel the switcher selection. |
toggle-scratchpad | Show or hide the default scratchpad. |
toggle-named-scratchpad <name> | Show or hide a named scratchpad pool. |
| Command | Description |
layout-scroller | Activate the scroller layout. |
layout-tile | Activate master-stack tiling. |
layout-grid | Activate grid layout. |
layout-monocle | Activate monocle (fullscreen stack) layout. |
layout-deck | Activate deck layout. |
layout-spiral | Activate spiral layout. |
layout-tgmix | Activate tgmix layout. |
layout-custom <name> | Select a declared Janet layout by name. |
layout-native <name> | Select a native substrate: frame-tree, bsp-tree, or i3. |
switch-layout | Cycle through the configured layout-cycle. |
set-layout-for-workspace <tag> <layout> | Set a layout on a specific workspace by tag ID. |
Master-Stackπ
| Command | Description |
master-count <n> / adjust-master-count <delta> | Set or adjust the number of master windows. |
master-ratio <ratio> / adjust-master-ratio <delta> | Set or adjust the master area size. |
Frame-Tree (Notion)π
| Command | Description |
frame-split-horizontal / frame-split-vertical | Split the focused frame. |
frame-unsplit | Remove the focused empty frame. |
frame-tab-next / frame-tab-prev | Cycle tabs within a frame. |
BSP & Dwindleπ
| Command | Description |
bsp-balance / bsp-equalize | Rebalance the tree or reset split ratios. |
bsp-preselect-left / -right / -up / -down | Set the insertion target for the next window. |
bsp-preselect-cancel | Clear the pending insertion target. |
Split-Tree (i3)π
| Command | Description |
split-tree-split-horizontal / split-tree-split-vertical | Set insertion direction. |
split-tree-layout-toggle-split | Toggle horizontal/vertical orientation. |
split-tree-layout-stacking / split-tree-layout-tabbed | Set container mode. |
split-tree-focus-parent / split-tree-focus-child | Navigate the container hierarchy. |
Window Manipulationπ
| Command | Description |
close-window | Request the focused window to close. |
toggle-floating | Toggle between tiled and floating. |
fullscreen-window | Toggle fullscreen mode. |
toggle-maximized | Toggle the client-visible maximized state. |
move-to-tag <id> / move-to-workspace <index> | Move the window and follow focus. |
move-window-to-tag <id> <tag> [follow] | Move a specific window by ID. |
move-to-scratchpad / move-to-named-scratchpad <name> | Send the window to a scratchpad pool. |
group-windows | Group the window with its neighbor. |
ungroup-window | Dissolve the active group. |
maximize-column | Toggle the focused column to full width. |
set-column-width <proportion> | Set exact column width, e.g. 0.5. |
resize-width <delta> / resize-height <delta> | Adjust window proportions. |
move-column-left / move-column-right | Swap columns in the scroller. |
move-window-left / -right / -up / -down | Swap windows directionally. |
consume-window / expel-window | Merge or split windows from columns. |
System & Sessionπ
| Command | Description |
spawn <argvβ¦> | Run a command. |
spawn-terminal | Launch the configured terminal. |
screenshot [--path <path>] | Capture a region, window, or screen. |
lock-session | Launch the configured screen locker. |
exit-session | Exit the session (requires allow-exit-session #true in config). |
rename-tag <name> | Rename the active workspace. |
warp-pointer <x> <y> | Warp the pointer on all active seats. |
Event Streamπ
Triad broadcasts state changes in a Niri-compatible JSON format. Subscribe with:
triad msg event-stream
| Event | Fired when |
WorkspaceActivated | Workspace switches. |
WindowFocusChanged | Focus moves to a different window. |
WindowOpened / WindowClosed | A window appears or disappears. |
Native JSON IPCπ
For scripting, send requests directly over $TRIAD_SOCKET.
{"triad":{"version":1,"request":"state"}}
{
"ok": true,
"triad": {
"version": 1,
"type": "state",
"state": { }
}
}
{"triad":{"version":1,"request":"action","action":"focus-workspace","workspace_idx":2}}
Subscribeπ
{"triad":{"version":1,"request":"event-stream","events":["state","layout"]}}
Triad sends an initial snapshot for each requested kind, then streams updates as they occur.