# window.Window.previous_layout

- **Module:** window.Window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/window.rs#L599
- **Page:** https://libtmux.org/en/rs/latest/reference/window-window-previous_layout/

```
window.Window.previous_layout(mut) -> Result<&mut Self, Error>
```

Move to the previous named layout, and return the window.

# Errors

Returns an error when tmux refuses the command.
