Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux latest

Window.select_layout

Select layout for window.

Source and package
Qualified name
libtmux.Window.select_layout
Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp RubyLuaTypeScriptRustGoJavaC#C++Swift Kotlin Scala OCaml F# Clojure
select_layout ( self, layout: str | None = None, spread: bool | None = None, next_layout: bool | None = None, previous_layout: bool | None = None, ) → Window

Description#

Wrapper for $ tmux select-layout <layout>.

Parameters
  • layout (str | None) # – String of the layout, 'even-horizontal', 'tiled', etc. Entering None (leaving this blank) is same as select-layout with no layout. In recent tmux versions, it picks the most recently set layout. 'even-horizontal' Panes are spread out evenly from left to right across the window. 'even-vertical' Panes are spread evenly from top to bottom. 'main-horizontal' A large (main) pane is shown at the top of the window and the remaining panes are spread from left to right in the leftover space at the bottom. 'main-vertical' Similar to main-horizontal but the large pane is placed on the left and the others spread from top to bottom along the right. 'tiled' Panes are spread out as evenly as possible over the window in both rows and columns. 'custom' Custom dimensions (see tmux(1) manpages).

  • spread (bool | None) # – Spread panes out evenly (-E flag). added 0.56

  • next_layout (bool | None) # – Move to the next layout (-n flag). added 0.56

  • previous_layout (bool | None) # – Move to the previous layout (-p flag). added 0.56

Returns

Window Self, for method chaining.

Raises

tmux command#

The tmux commands behind select_layout.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Set a window's pane layout

Equivalents of Set a window's pane layout in other languages
Language Equivalent
Ruby LibTmux::Window#select_layout
Lua libtmux.Window:layout
Erlang tmux_window:select_layout/2
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript window.Window.selectLayout
Rust window.Window.select_layout
Go tmux.Window.SelectLayout
Java io.github.libtmux.Window.selectLayout
C# LibTmux.Window.SelectLayoutAsync
C++ libtmux::Window::select_layout
Swift Server.selectLayout(_:_:)
OCaml Libtmux_unix.Client.select_layout
Perl LibTmux::Server::select_layout Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes.

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference