Find pane by positionΒΆ

find_pane_by_positionΒΆ

find_pane_by_position
ΒΆ
readonly tool
readonly tool
find_pane_by_position
ΒΆ

Find the pane occupying a corner of a tmux window.

Returns:

PaneInfo

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

corner

PaneCorner

yes

β€”

One of 'top-left', 'top-right', 'bottom-left', 'bottom-right'.

window_id

str

no

β€”

Window ID (e.g. β€˜@1’).

window_index

str

no

β€”

Window index. Requires session_name or session_id.

session_name

str

no

β€”

Session name.

session_id

str

no

β€”

Session ID.

socket_name

str

no

β€”

tmux socket name.