# client-active

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

> Run when a client becomes the latest active client of its session.

hook tmux3.7c

Run when a client becomes the latest active client of its session.

* Scope

  session

* Set

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

* Read

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

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

Run when a client becomes the latest active client of its session.

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

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

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

* Defined in

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

* Fired from

  * [`server-client.c:1144`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1144) 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-active)

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

Library documentation that names this hook.

* Rust

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

* Go

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