# LibTmux.select_window

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Julia
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/topology.jl#L340
- **Page:** https://libtmux.org/en/julia/latest/reference/libtmux-select_window/

```
select_window(
    connection::LibTmux.ControlConnection,
    target::LibTmux.WindowLinkRef;
    kwargs...
)

select_window(server::LibTmux.Server, target::LibTmux.WindowLinkRef; kwargs...)
```

## Methods

### `select_window` (overload 1)

```julia
select_window(
    connection::LibTmux.ControlConnection,
    target::LibTmux.WindowLinkRef;
    kwargs...
)
```

[Source](https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/control_topology.jl#L358).

Focus a checked session/index link on the pinned daemon. This selects the requested occurrence even when its physical window has multiple links in the same session. Membership may race concurrent changes after the check.

```julia
select_window(connection::ControlConnection, link::WindowLinkRef; kwargs...)
```

### `select_window(server::LibTmux.Server, target::LibTmux.WindowLinkRef; kwargs...)`

[Source](https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/topology.jl#L347).

Focus one session's exact window link after checking its observed generation and expected physical window. Checks are best effort; a link can change after preflight. No arbitrary session is selected for a shared window.

```julia
select_window(server, target::WindowLinkRef; kwargs...)
```

## Parameters

- `connection` (`LibTmux.ControlConnection`) (for `select_window(connection, target, kwargs)`)
- `target` (`LibTmux.WindowLinkRef`)
- `kwargs`
- `server` (`LibTmux.Server`) (for `select_window(server, target, kwargs)`)
