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

window.PaneSize

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

How much space a new pane gets.

Examples

use libtmux::{PaneSize, SplitDirection, SplitOptions};
// A size renders as tmux's own `-l` argument, cells bare and shares suffixed.
assert_eq!(PaneSize::Cells(20).to_string(), "20");
assert_eq!(PaneSize::Percent(25).to_string(), "25%");
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");
let pane = window
.split(SplitOptions::new(SplitDirection::Below).size(PaneSize::Percent(25)))
.await?;
assert!(pane.height() > 0);
guard.shutdown().await?;

2 declared, 0 inherited

Members

  • Cells constant A number of rows or columns, depending on the split direction.
  • Percent constant A share of the space being divided, as a percentage.
Esc

Type to search.