# window.PaneDirection

- **Module:** window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** enum
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/window.rs#L57
- **Page:** https://libtmux.org/en/rs/latest/reference/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.

## Example

```rust
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?;
```

## 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.
