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

window.JoinOptions

Rust
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
window
Package
libtmux
Source
crates/libtmux/src/window.rs
struct window.JoinOptions
structoverload [source]
structoverload [source]
struct window.JoinOptions

Where a pane lands when it is moved into another window.

Pane::break_out takes a pane out into a window of its own and this puts one back, so between them a pane can be moved anywhere. tmux spawns nothing here, which is why this carries none of the command, directory, or environment a SplitOptions does: the pane already exists and keeps everything running in it.

Examples

use libtmux::{JoinOptions, SplitDirection};
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("moving").await?;
let window = session.active_window().await?.expect("a window");
let second = session.new_window("elsewhere").await?;
let stranded = second.panes().await?.remove(0);
// Put a pane from the other window beside this one.
let here = window.panes().await?.remove(0);
let moved = stranded
.join_into(&here, JoinOptions::new(SplitDirection::Below))
.await?;
assert_eq!(moved.window_id(), window.id());
guard.shutdown().await?;

3 declared, 0 inherited

Members

  • full method Span the window rather than only the pane being joined.
  • new method Land the pane in one direction from the pane it joins.
  • size method Ask for a size rather than letting tmux halve the space.
Esc

Type to search.