Server.hooks(_:)
Hooks tmux has a command for.
Source and package
- Qualified name
-
Server.hooks(_:) - Declared in
Server- Package
- libtmux-swift
- Source
- Sources/LibTmux/Options.swift
- Other languages
- Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++ Kotlin Scala OCamlfunction F# Clojure
-
Description#
show-hookslists every hook name tmux knows, most with nothing bound. Only the bound ones are reported here — an unbound name is not a hook, it is a place one could go.
tmux command#
The tmux commands behind hooks(_:).
tmux C API#
The C declarations in tmux that implement these commands.
tmux hooks#
Events that run tmux commands, with the scope each hook belongs to and where tmux fires it.
Guides#
Pages that discuss hooks(_:).
In other ports#
Read the server's global hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Rust | server |
| Go | no equivalent on Server |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
| Perl | Lib Use global => true; raw bytes preserve sparse hook indexes and tmux quoting. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read a session's hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | session |
| Rust | session |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
| Perl | Lib Use an explicit session target ID; raw bytes preserve sparse hook indexes and tmux quoting. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read a window's hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | window |
| Rust | no whole-table read; Window.hook reads one |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | no equivalent on Window |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
Read a pane's hooks
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | pane |
| Rust | no whole-table read; Pane.hook reads one |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | no equivalent on Pane |
| OCaml | Libtmux Pass the corresponding explicit Options scope; captured tables preserve their source and inheritance policy. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.