Find pane by positionΒΆ
find_pane_by_positionΒΆ
Find the pane occupying a corner of a tmux window.
- Returns:
Use when you need to act on a layout-relative pane β βthe bottom-right paneβ, βwhichever pane is in the top-leftβ β without listing every pane and computing geometry yourself.
Avoid when you already know the pane_id. Use get_pane_info
or select_pane directly.
Side effects: None. Read-only.
Example:
{
"tool": "find_pane_by_position",
"arguments": {
"corner": "bottom-right",
"window_id": "@0"
}
}
Response is a PaneInfo for the pane occupying
that corner. The new geometry fields make the result self-describing:
{
"pane_id": "%3",
"pane_left": 40,
"pane_top": 12,
"pane_right": 79,
"pane_bottom": 23,
"pane_at_left": false,
"pane_at_right": true,
"pane_at_top": false,
"pane_at_bottom": true,
"pane_tty": "/dev/pts/5"
}
Tie-break. When multiple panes satisfy both edge predicates (a
single-pane window touches every edge; some custom layouts can produce
ambiguous corners) the visually innermost pane wins β the one with the
largest pane_left + pane_top.
Parameters
Parameter |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
PaneCorner |
yes |
β |
One of |
|
no |
β |
Window ID (e.g. β@1β). |
|
|
no |
β |
Window index. Requires session_name or session_id. |
|
|
no |
β |
Session name. |
|
|
no |
β |
Session ID. |
|
|
no |
β |
tmux socket name. |