On this page
window.Window.link_to
- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
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.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()));
0 declared, 0 inherited