# 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/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Hooks.java#L60
- **Page:** https://libtmux.org/reference/java/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.

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