- Module
- libtmux
- Declared in
- Window
- Package
- libtmux
- Source
- src/libtmux/window.py
- Other languages
- RubyLuaTypeScriptRustGoJava.NETC++Swift
-
Link this window to another session via
$ tmux link-window.- Parameters
-
-
target_session ( str | Session ) – Target session to link the window to.
-
target_index ( str | None ) – Target window index in the destination session.
-
kill_existing ( bool | None ) – Kill target window if it exists (
-kflag). -
after ( bool | None ) – Insert after the target window (
-aflag). -
before ( bool | None ) – Insert before the target window (
-bflag). -
detach ( bool | None ) – Do not make the linked window active (
-dflag).
-
In other ports Link a window into another session
- Ruby
LibTmux::Session#link_window - Lua
libtmux.WindowLink:link - TypeScript
window.Window.link - Rust
window.Window.link_to - Go
tmux.Window.Link - Java
io.github.libtmux.Window.Window.linkTo - .NET
LibTmux.Window.LinkAsync - C++
libtmux::Window::link_to - Swift
Server.link(_:into:)
Examples
>>> w = session.new_window(window_name='link_test')>>> s2 = server.new_session(session_name='link_target')>>> w.link(s2)await window.link({ session: "other" });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