Core LibrarystableAPI Reference

Choose documentation 3

stable

Current version

stable
English

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

Python API

method libtmux stable

Pane.new_pane

Create a floating Pane via $ tmux new-pane (tmux 3.7+).

Source and package
Qualified name
libtmux.Pane.new_pane
Module
libtmux
Declared in
Pane
Package
libtmux
Source
src/libtmux/pane.py
new_pane
( 17 parameters ) ( self, target: int | str | None = None, start_directory: StrPath | None = None, attach: bool = False, shell: str | None = None, environment: dict[str, str] | None = None, width: int | None = None, height: int | None = None, x: int | None = None, y: int | None = None, zoom: bool | None = None, empty: bool | None = None, style: str | None = None, active_border_style: str | None = None, inactive_border_style: str | None = None, message: str | None = None, keep: bool | None = None, )
→ Pane

Description#

Use split for a tiled pane. Floating panes sit above the tiled layout like a popup, but unlike a popup they are not modal and behave like normal panes. The returned pane has pane_floating_flag == "1".

Examples#

>>> from libtmux.common import has_gte_version
>>> if has_gte_version("3.7"):
... floating = pane.new_pane(width=40, height=10, shell="sleep 5")
... is_floating = floating.pane_floating_flag
... else:
... is_floating = "1"
>>> is_floating
'1'
Parameters
Returns

Pane The newly created floating pane.

Raises
Esc

Type to search.

Reference preview Open reference