it2 window focus

Focus/activate a window

Synopsis

it2 window focus <window-id> [flags]

Examples

# Focus a specific window
$ it2 window focus window-123
# Focus and bring to front
$ it2 window focus --order-front window-123
# Focus without bringing to front
$ it2 window focus --order-front=false window-123
# Switch between two windows
$ it2 window focus window-456
# Focus first window in list
$ it2 window focus $(it2 window list --format id | head -1)

Options

--order-front (default true)

Bring window to front after activation

Options inherited from parent commands

--format (default "text")

Output format (text, json, yaml) - affects how command results are displayed

--timeout

Timeout for API operations - how long to wait for iTerm2 to respond

--url

WebSocket URL for iTerm2 API - typically ws://localhost:1912 for local iTerm2

See Also