Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-rs latest

JoinOptions

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

Source and package
Qualified name
libtmux::window::JoinOptions
Module
window
Package
libtmux
Source
crates/libtmux/src/window.rs
struct window.JoinOptions

Description#

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?;

Members3#

  • 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.

Reference previewOpen reference