Window.new_pane
Create a floating Pane in this window ($ tmux new-pane).
Source and package
- Qualified name
-
libtmux.Window .new _pane - Module
- libtmux
- Declared in
- Window
- Package
- libtmux
- Source
- src/libtmux/window.py
-
Description#
Use
splitfor a tiled pane. Floating panes require tmux 3.7+; delegates toPane.new_paneon the active pane.Examples#
>>> from libtmux.common import has_gte_version>>> if has_gte_version("3.7"):... floating = window.new_pane(width=40, height=10, shell="sleep 5")... is_floating = floating.pane_floating_flag... else:... is_floating = "1">>> is_floating'1'- Parameters
-
-
start_directory(StrPath | None) # – Working directory for the new pane (-c). -
attach(bool) # – Make the new pane active, default False (-dotherwise). -
shell(str | None) # – Command to run; the pane closes when it exits. -
environment(dict[str, str] | None) # – Environment variables for the new pane (-e). -
empty(bool | None) # – Create an empty pane with no command (-E). -
active_border_style(str | None) # – Border style when the pane is active (-S). -
inactive_border_style(str | None) # – Border style when the pane is inactive (-R). -
message(str | None) # – Keep the pane open (until a key is pressed) after the command exits, showing thisremain-on-exit-formatmessage (-m). -
keep(bool | None) # – Keep the pane open until a key is pressed after exit (-k), using the defaultremain-on-exit-format.
- Returns
-
PaneThe newly created floating pane.