- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
- Other languages
- PythonTypeScriptGoJava.NETC++Swift
-
Link this window into another session, so both hold the same window.
A linked window is one window with two winlinks, not a copy: renaming it or splitting it shows up in both sessions.
Window::unlinktakes one link away again.indexplaces the link at a window index, or appends whenNone.Errors
Returns
Error::ServerMismatchwhensessionbelongs to another server, or an error when tmux refuses the link, including an occupied index.In other ports Link a window into another session
- Python
libtmux.Window.link - TypeScript
window.Window.link - Go
tmux.Window.Link - Java
io.github.libtmux.Window.Window.linkTo - .NET
LibTmux.Window.LinkAsync - C++
libtmux::Window::link_to - Swift
Server.link(_:into:)
- Python
Examples
let source = server.new_session("linking-from").await?;let target = server.new_session("linking-to").await?;let window = source.windows().await?.remove(0);
window.link_to(&target, None).await?;
let linked = target.windows().await?;assert!(linked.iter().any(|other| other.id() == window.id()));>>> w = session.new_window(window_name='link_test')>>> s2 = server.new_session(session_name='link_target')>>> w.link(s2)await window.link({ session: "other" });0 declared, 0 inherited