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

window.PaneDirection

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

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

Members

  • Above constant The pane above.
  • Below constant The pane below.
  • Left constant The pane to the left.
  • Right constant The pane to the right.
Esc

Type to search.