# client-attached

Source: https://libtmux.org/en/tmux/3.7c/catalog/hooks/client-attached/

> Run when a client is attached.

hook tmux3.7c

Run when a client is attached.

* Scope

  session

* Set

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

* Read

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

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

Run when a client is attached.

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

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/hooks/client-attached/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-attached/) : present

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

* Defined in

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

* Fired from

  * [`cmd-attach-session.c:166`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-attach-session.c#L166) in `notify_client`

* C source reference

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

* CLI Manual

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

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

Library documentation that names this hook.

* Rust

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

* Go

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