# pane.Pane.setHook

- **Module:** pane.Pane
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/pane.ts#L133
- **Page:** https://libtmux.org/reference/ts/pane-pane-sethook/

```
pane.Pane.setHook(name: : string, command: : string, options: : SetHookOptions) -> Promise<void>
```

Bind a tmux command to a pane-scoped hook.

## Example

```ts
await pane.setHook("pane-title-changed", "display-message 'title changed'");
```
