session.WindowPlacement
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
-
Where a new window goes, relative to the index it is given.
Without one, tmux takes the first free index.
Examples
use libtmux::{NewWindowOptions, WindowPlacement};let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("work").await?;let first = session.active_window().await?.expect("a session has a window");// Inserting before an index shifts the windows already at or after it, so// the index a caller holds is only good until the next insert.let inserted = session.new_window(NewWindowOptions::new("inserted").index(first.index()).placement(WindowPlacement::Before),).await?;assert!(inserted.index() <= first.index());guard.shutdown().await?;
2 declared, 0 inherited