# io.github.libtmux.Hooks.Hooks.set

- **Module:** io.github.libtmux.Hooks.Hooks
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/Hooks.java#L61
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-hooks-hooks-set/

```
io.github.libtmux.Hooks.Hooks.set(event: String, command: String) -> void
```

Binds a tmux command to an event at this scope, replacing anything already bound to it.

Replacing, not adding: tmux discards the whole array. {@link #append} is how a second
command joins the first.
