# LibTmux::Hooks#set

- **Module:** LibTmux::Hooks#
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/c6d9d21771828e583692ca899ed817f9640d6a55/gems/libtmux/lib/libtmux/options.rb#L170
- **Page:** https://libtmux.org/en/ruby/latest/reference/libtmux-hooks-set/

```
LibTmux::Hooks#set(arg1: ::String, command: ::String, index: ::Integer? = nil, append: bool = nil, timeout: ::Numeric = nil, cancel: untyped = nil) -> ::LibTmux::CommandResult
```

Behavior: Options and hooks.

Behavior contract: Options and hooks.

## Raises

- `ArgumentError`
