# window-layout-changed

Source: https://libtmux.org/en/tmux/latest/catalog/hooks/window-layout-changed/

> Run when a window layout is changed.

hook tmux3.7c

Run when a window layout is changed.

* Scope

  window

* Set

  [`set-hook`](https://libtmux.org/en/tmux/latest/manual/set-hook/) `window-layout-changed command`

* Read

  [`show-hooks`](https://libtmux.org/en/tmux/latest/manual/show-hooks/) `window-layout-changed`

## Description[#](https://libtmux.org/en/tmux/latest/catalog/hooks/window-layout-changed/#description)

Run when a window layout is changed.

## Releases[#](https://libtmux.org/en/tmux/latest/catalog/hooks/window-layout-changed/#releases)

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

## Source[#](https://libtmux.org/en/tmux/latest/catalog/hooks/window-layout-changed/#source)

* Defined in

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

* Fired from

  * [`cmd-join-pane.c:137`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-join-pane.c#L137) in `notify_window`
  * [`cmd-join-pane.c:138`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-join-pane.c#L138) in `notify_window`
  * [`cmd-select-layout.c:142`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-layout.c#L142) in `notify_window`
  * [`cmd-swap-pane.c:161`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-pane.c#L161) in `notify_window`
  * [`cmd-swap-pane.c:163`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-swap-pane.c#L163) in `notify_window`
  * [`layout-custom.c:289`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L289) in `notify_window`
  * [`layout-set.c:190`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L190) in `notify_window`
  * [`layout-set.c:304`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L304) in `notify_window`
  * [`layout-set.c:406`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L406) in `notify_window`
  * [`layout-set.c:508`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L508) in `notify_window`
  * [`layout-set.c:610`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L610) in `notify_window`
  * [`layout-set.c:731`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-set.c#L731) in `notify_window`
  * [`layout.c:725`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L725) in `notify_window`
  * [`layout.c:1218`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L1218) in `notify_window`
  * [`resize.c:63`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/resize.c#L63) in `notify_window`
  * [`spawn.c:516`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/spawn.c#L516) in `notify_window`
  * [`window.c:744`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L744) in `notify_window`
  * [`window.c:770`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L770) in `notify_window`

* C source reference

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

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/latest/manual/full/#hooks-window-layout-changed)

## Used by[#](https://libtmux.org/en/tmux/latest/catalog/hooks/window-layout-changed/#used-by)

Library documentation that names this hook.

* Go

  [`tmux.WindowHookValues.WindowLayoutChanged`](https://libtmux.org/en/go/latest/reference/tmux-windowhookvalues-windowlayoutchanged/)
