# LibTmux.Server.readHook

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Server.hs#L612
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-readhook/

```haskell
readHook
  :: Server -> OptionTarget -> Text -> IO (Maybe ByteString)
```

Signature types: [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`OptionTarget`](/en/haskell/latest/reference/libtmux-options-t-optiontarget/), [`Text`](https://hackage.haskell.org/package/text-2.1.3/docs/Data-Text.html#t:Text), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO), [`Maybe`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#t:Maybe), [`ByteString`](https://hackage.haskell.org/package/bytestring-0.12.2.0/docs/Data-ByteString.html#t:ByteString).

Read one built-in event's local hook as tmux serializes it, preserving
 keys, order and line endings. [Nothing](https://hackage.haskell.org/package/base-4.22.0.0/docs/Data-Maybe.html#v:Nothing) means no local hook. The native
 empty-hook record, when present, contains the event name. The reply is
 bounded to 64 KiB.

## Referenced declarations

- [`LibTmux.Options.OptionTarget`](/en/haskell/latest/reference/libtmux-options-t-optiontarget/) (data type)
- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)

## tmux command

The tmux commands behind `readHook`.

- [`show-hooks`](/en/tmux/latest/manual/show-hooks/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_show_hooks_entry`](/en/tmux/latest/reference/c-variable-cmd_show_hooks_entry/) (attribute)
- [`cmd_show_options_exec`](/en/tmux/latest/reference/c-function-cmd-show-options-c-cmd_show_options_exec/) (function)

## Guides

Pages that discuss `readHook`.

- [Read and change options and hooks](/en/haskell/latest/guides/options/)
- [Implementation status](/en/haskell/latest/guides/status/)
