window.PaneDirection
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
Which way to move focus among a window's panes.
tmux decides what is "up" from a pane's position on screen rather than from its index, so these follow the layout rather than the pane order.
Examples
use libtmux::{PaneDirection, 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");let lower = window.split(SplitDirection::Below).await?;// Focus follows the layout, and tmux wraps at the edge rather than// refusing, so this always names a pane.let focused = window.focus_direction(PaneDirection::Below).await?;assert_eq!(focused.id(), lower.id());guard.shutdown().await?;
4 declared, 0 inherited