window.Window.set_hook
Rust
- Python
- TypeScript
- Rust
- Go
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift
- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- crates/libtmux/src/window/settings.rs
- Other languages
- PythonTypeScriptGo Java .NET C++ Swift
-
Set one hook to a tmux command.
Hooks live in the same option tables, so a hook is an array option and
Self::typed_optionreads it under an indexed name such asafter-new-window[0].Errors
Returns an error when tmux rejects the hook name or command.
Returns
crate::Error::OptionScopeMismatchwhen tmux keeps the option in another of its tables.Discussed in Options and hooks
In other ports Bind a command to a window hook
- Python
libtmux.Window.set_hook - TypeScript
window.Window.setHook - Go
tmux.Window.SetHook - Java reached through
Window.hooks, whoseHookscarries the write - .NET reached through
Window.Hooks, whoseTmuxHookscarries the write - C++ no equivalent on
Window - Swift
Server.setHook(_:to:at:in:)
- Python
0 declared, 0 inherited