# window-linked

Source: https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/

> Run when a window is linked into a session.

hook tmux3.7c

Run when a window is linked into a session.

* Scope

  session

* Set

  [`set-hook`](https://libtmux.org/en/tmux/3.7c/manual/set-hook/) `window-linked command`

* Read

  [`show-hooks`](https://libtmux.org/en/tmux/3.7c/manual/show-hooks/) `window-linked`

## Description[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/#description)

Run when a window is linked into a session.

## Releases[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/) : scope window to session
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/hooks/window-linked/) : present

## Source[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/#source)

* Defined in

  [`options-table.c:1706`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L1706)

* Fired from

  * [`session.c:333`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L333) in `notify_session_window`
  * [`session.c:660`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L660) in `notify_session_window`
  * [`spawn.c:194`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L194) in `notify_session_window`

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/3.7c/reference/c-variable-options_table/), [`notify_session_window`](https://libtmux.org/en/tmux/3.7c/reference/c-function-notify_session_window/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.7c/manual/full/#hooks-window-linked)

## Used by[#](https://libtmux.org/en/tmux/3.7c/catalog/hooks/window-linked/#used-by)

Library documentation that names this hook.

* Rust

  [`options.generated.WINDOW_LINKED`](https://libtmux.org/en/rs/latest/reference/options-generated-window_linked/)

* Go

  [`tmux.ServerHookValues.WindowLinked`](https://libtmux.org/en/go/latest/reference/tmux-serverhookvalues-windowlinked/), [`tmux.SessionHookValues.WindowLinked`](https://libtmux.org/en/go/latest/reference/tmux-sessionhookvalues-windowlinked/)
