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.

enum libtmux-rs latest

SplitDirection

Where a split puts the pane it makes.

Source and package
Qualified name
libtmux::window::SplitDirection
Module
window
Package
libtmux
Source
crates/libtmux/src/window.rs
enum window.SplitDirection

Examples#

use libtmux::SplitDirection;
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
let window = session.active_window().await?.expect("a session has a window");
// The direction names where the *new* pane lands, not which edge moves.
window.split(SplitDirection::Right).await?;
window.split(SplitDirection::Below).await?;
assert_eq!(window.panes().await?.len(), 3);
guard.shutdown().await?;

Variants4#

SplitDirection variants
CasePayloadDescription
Above No payload Above the pane being divided.
Below No payload Below it, which is tmux's default.
Left No payload To its left.
Right No payload To its right.
Esc

Type to search.

Reference previewOpen reference