# libtmux.Session:renumber_windows

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/_internal/entity.lua#L430
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-session-renumber_windows/

```
renumber_windows: fun(
  self: libtmux.Session,
  options?: libtmux.TopologyOptions,
):libtmux.Request<boolean>
```

## Parameters

- `options` (`libtmux.TopologyOptions?`)

## tmux command

The tmux commands behind `renumber_windows`.

- [`move-window`](/en/tmux/latest/manual/move-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_move_window_entry`](/en/tmux/latest/reference/c-variable-cmd_move_window_entry/) (attribute)
- [`cmd_move_window_exec`](/en/tmux/latest/reference/c-function-cmd-move-window-c-cmd_move_window_exec/) (function)

## Guides

Pages that discuss `renumber_windows`.

- [Topology operations](/en/lua/v0.1.1/guides/topology/)
