Skip to main content
Browse referenceAll guides
Back to Commands
Pane ManagementPrefix + *tmux 3.7+

new-pane

Short form: newp

Create a floating pane — a pane that sits above the tiled layout like a popup, but is not modal and behaves like a regular pane (same escape sequence support, appears in pane lists). Added in tmux 3.7 and bound to Prefix + * by default.

How new-pane works

new-pane, added in tmux 3.7, creates a floating pane: a pane that sits on top of your normal tiled layout, like a popup. Unlike display-popup, it is not modal. You can click back into your other panes while it stays open, and it behaves like any other pane, including terminal escape sequences and showing up in pane lists. Press Prefix + * to open one.

With no command, the floating pane runs your shell. Give a command to run something else, such as htop or a test runner. -c sets its working directory. -k keeps the pane open after the command ends until you press a key, and -m does the same with your own message.

This is an early version of the feature. In 3.7, floating panes can only be moved and resized with the mouse, so turn on set -g mouse on. tmux 3.7c also unzooms the window before creating a floating pane, which fixed a crash in earlier 3.7 releases.

Synopsis

bash
tmux new-pane [-bdefhIklPvZ] [-c start-directory] [-e environment] [-F format] [-l size] [-m message] [-p percentage] [-s style] [-S active-border-style] [-R inactive-border-style] [-x width] [-y height] [-X x-position] [-Y y-position] [-t target-pane] [shell-command [argument ...]]

Options

FlagDescription
-dDon't make the new pane the active pane
-c start-directorySpecify starting directory
-kKeep the pane open after shell-command exits until a key is pressed
-m messageLike -k, but also sets remain-on-exit-format for this pane
-ECreate an empty pane with no command running in it
-s styleSet the style for the pane content
-S active-border-styleSet the border style when the pane is active
-R inactive-border-styleSet the border style when the pane is inactive

Examples

Open a floating pane above the current layout

bash
tmux new-pane

Run htop in a floating pane

bash
tmux newp 'htop'

Keep the floating pane open after the command exits, until a key is pressed

bash
tmux new-pane -k 'make test'

Open a floating pane in the current directory

bash
tmux new-pane -c '#{pane_current_path}'

Run tests in a floating pane and keep it open with your own message when they finish.

bash
tmux new-pane -m 'Tests finished, press a key' 'npm test'

In .tmux.conf: Prefix + g opens lazygit in a floating pane in the current folder.

bash
bind g new-pane -c '#{pane_current_path}' lazygit

Default Keybinding

Prefix + *

Default prefix is Ctrl+b

Common Mistakes

  • It needs tmux 3.7 or later. On older versions you will see 'unknown command: new-pane'. Check your version with tmux -V.
  • In 3.7 you cannot yet swap floating panes, resize them with resize-pane, turn them into tiled panes, or restore them as part of a saved layout.
  • Without mouse support there is no way to move or resize a floating pane, so it can end up covering what you need to see.

Pro Tips

  • •Floating panes are an early feature in tmux 3.7 — they can only be moved and resized with the mouse
  • •Unlike display-popup, a floating pane is not modal: you can keep working in tiled panes while it stays open
  • •With a two-line status line (set -g status 2), the default second line shows a list of panes