libtmux Reference MCP Search
On this page

tmux.Window.Select

View as Markdown

Module
tmux
Declared in
Window
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/window_lifecycle.go
Other languages
PythonTypeScriptRustJava.NETC++Swift
Select ( ctx : context.Context ) (Window, error)
method [source]
method [source]
Select

Select makes the receiver's exact winlink current in its session. It does not promise focus for clients attached to other sessions. Select returns a canonical freshly materialized Window , which may use another linked session for the same WindowID. If the command succeeds but refresh fails, it returns the receiver with that error. A transport or context error can be delivery-ambiguous; no rollback is attempted.

In other languages Make a window active

Examples

>>> window = session.active_window
>>> new_window = session.new_window()
>>> session.refresh()
>>> active_windows = [w for w in session.windows if w.window_active == '1']
>>> new_window.window_active == '1'
False
>>> new_window.select()
Window(...)
>>> new_window.window_active == '1'
True
await window.select();

0 declared, 0 inherited

Esc

Type to search.