- Module
- tmux
- Declared in
- Session
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/window_lifecycle.go
- Other languages
- PythonRubyLuaTypeScriptRustJava.NETC++Swift
- NewWindow ( ctx : context.Context , request : NewWindowRequest ) (Window, error)
-
NewWindow creates a winlink in the receiver session. Attach selects it as that session's current window; it is not a guarantee about clients attached to other sessions. The returned
Windowis freshly materialized in the receiver's exact session context, including when its stableWindowIDis linked elsewhere.SelectExisting no-output recovery is available only when Index is nil. It expands Name with tmux's version-specific rules and requires exactly one matching window name in the receiver session. An explicit Index has no such recovery. If tmux reports a WindowID before a transport or refresh failure, the partial result contains that ID and the receiver SessionID with Index -1. Other failures return zero; creation is not rolled back.
In other ports Create a window
- Python
libtmux.Session.new_window - Ruby
LibTmux::Session#new_window - Lua
libtmux.Session:new_window - TypeScript
session.Session.newWindow - Rust
session.Session.new_window - Java
io.github.libtmux.Session.Session.newWindow - .NET
LibTmux.Session.CreateWindowAsync - C++
libtmux::Session::new_window - Swift
Server.newWindow(in:named:startDirectory:)
- Python
0 declared, 0 inherited