PaneDirection
Which way to move focus among a window's panes.
Source and package
- Qualified name
-
libtmux::window:: Pane Direction - Module
- window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
Description#
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?;