Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

View as Markdown

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 (-k flag).

  • after ( bool | None ) – Insert after the target window (-a flag).

  • before ( bool | None ) – Insert before the target window (-b flag).

  • detach ( bool | None ) – Do not make the linked window active (-d flag).

In other ports Link a window into another session

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

Esc

Type to search.