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

window.Rotation

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
enum window.Rotation
enumoverload [source]
enumoverload [source]
enum window.Rotation

Where a split puts the new pane, relative to the one being divided.

tmux spells these -v, -v -b, -h, and -h -b, where "horizontal" means side by side. Naming the resulting position instead removes a question every tmux user has asked at least once.

Examples

use libtmux::{Rotation, 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");
window.split(SplitDirection::Below).await?;
// Rotating moves panes between positions; it does not create or destroy any.
let before = window.panes().await?.len();
window.rotate(Rotation::Down).await?;
assert_eq!(window.panes().await?.len(), before);
guard.shutdown().await?;

2 declared, 0 inherited

Members

  • Down constant Move each pane to the position after it, which is tmux's default.
  • Up constant Move each pane to the position before it, so the first becomes last.
Esc

Type to search.