libtmux Reference MCP Search
On this page

server.Server.setHook

View as Markdown

Module
server
Declared in
Server
Package
@libtmux/libtmux
Source
packages/libtmux/src/server.ts
setHook ( name : : string , command : : string , options : : SetHookOptions ) Promise<void>
method [source]
method [source]
setHook

Bind a tmux command to a global hook.

A hook holds a list of commands. Without append this writes the whole list, so it replaces whatever the hook already ran.

Examples

await server.setHook("session-created", "display-message 'hello'");
await server.setHook("session-created", "display-message 'and this'", { append: true });

0 declared, 0 inherited

Esc

Type to search.