# LibTmux::Window#hooks

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/da7b6191b9439e3c84fa1c9eeaa9168263ee7af4/gems/libtmux/lib/libtmux/operations.rb#L243
- **Public owner:** LibTmux::Entity#hooks
- **Page:** https://libtmux.org/en/ruby/v0.1.1/reference/libtmux-window-hooks/

```
def hooks: () -> ::LibTmux::Hooks
```

Behavior: Options and hooks.

Behavior contract: Options and hooks.

## tmux hooks

Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.

- [Hooks](/en/tmux/latest/catalog/hooks/) (hook)

## In other ports

Read a window's hooks

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.show_hooks`](/en/py/latest/reference/libtmux-window-show_hooks/) (method) |
| Lua | [`libtmux.Window:list_hooks`](/en/lua/latest/reference/libtmux-window-list_hooks/) (method) |
| TypeScript | [`window.Window.showHooks`](/en/ts/latest/reference/window-window-showhooks/) (method) |
| Rust | no whole-table read; `Window.hook` reads one |
| Go | [`tmux.Window.Hooks`](/en/go/latest/reference/tmux-window-hooks/) (method) |
| Java | [`io.github.libtmux.Window.hooks`](/en/java/latest/reference/io-github-libtmux-window-window-hooks/) (method) |
| C# | [`LibTmux.Window.Hooks`](/en/csharp/latest/reference/libtmux-window-hooks/) (property) |
| C++ | no equivalent on `Window` |
| Swift | [`Server.hooks(_:)`](/en/swift/latest/reference/server-hooks(_-)/) (method) |

No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.
