Terminal and shell
The terminal panel sits below the file panes and can hold several tabs. Each tab keeps its process and scrollback while another tab is active.
Open and move between terminals
Section titled “Open and move between terminals”| Action | Shortcut |
|---|---|
| Show or hide the panel | Ctrl + ` |
| Create a terminal | Ctrl + Shift + ~ |
| Type the selected names into the terminal | Mod + Enter |
| Previous or next terminal | Ctrl + Page Up / Ctrl + Page Down |
| Focus the panes or terminal | Alt + Up / Alt + Down |
| Maximize the focused terminal or restore the split | Mod + F11 |
A new terminal starts in the active pane’s directory; from inside an archive it starts beside the archive. For S3, SFTP, and other mounts with no shell directory, it starts in the session’s default directory. In a remote or elevated session, the shell runs on that target, not on the computer displaying Newt.
Open in Terminal (Mod + Enter) types the selected names, or the focused one, into the active terminal, quoted for Bash, and moves focus there so you can finish the command. If no terminal is open, it opens one first.
While a terminal has focus, keys go to the program running there, even when a
Newt command uses the same key; shortcuts such as Ctrl +
R or F10 mean something to a shell. The exceptions are
the panel commands in the table above (except Open in Terminal) and any
binding with when = "terminal_focused".
The maximize button at the right end of the tab bar lets the terminal fill the window; see Maximized layout. While it is maximized, Alt + Up shows the active pane.
Context menus
Section titled “Context menus”Right-click inside a terminal for Copy, Paste, Select All, Clear (clears the scrollback but keeps the prompt), Close Terminal, New Terminal, and maximize and hide commands. Right-clicking a tab also offers Close Other Terminals.
When the program in the terminal uses the mouse, such as tmux, htop, or vim
with mouse=a, a right-click goes to the program. Hold Shift while
right-clicking to open Newt’s menu, or while dragging to select text.
Clipboard and exited processes
Section titled “Clipboard and exited processes”Copy and paste with Ctrl + Shift + C/V on Linux and Windows, the standard Command shortcuts on macOS, or the context menu. Ctrl + V is sent to the program as ^V. Newt does not ask for confirmation before pasting several lines.
When behavior.keep_terminal_open is enabled, an exited shell stays visible until you press Enter in that tab.
Font and scrollback
Section titled “Font and scrollback”Under Terminal in Settings, choose the font as a CSS font-family list (by
default Menlo, Monaco, "Courier New", monospace; the first installed font is
used), the font size (12 by default), and the number of scrollback lines per
terminal (1000 by default). Changes apply to open terminals immediately.
The newt shell command
Section titled “The newt shell command”Built-in terminals and user commands have a newt command on their path that controls the visible panes from scripts:
newt pwdnewt cd ~/projectsnewt focus Cargo.tomlnewt view README.mdnewt edit src/main.rsnewt cat archive.zip/README.txtnewt cp report.pdf ../archive/newt select '*.rs' --addnewt cmd copy- Most commands accept
--pane active,other,left, orright. Paths can use mounted forms such ass3://bucket/key, and separators follow the target pane’s filesystem. newt selectuses the same glob or/regexsyntax as Select by Pattern. It replaces the selection unless you pass--addor--remove. With no pattern it reads names from standard input, sogit ls-files | newt selectselects those files in the pane.newt cmd <id>runs any Command Palette command by its keybinding ID (user_command_Nfor user commands), exiting with status 1 on failure. Runnewt cmdalone to list the IDs.
Run newt --help or newt <command> --help for full syntax and examples.
Shell integration is controlled by behavior.shell_integration for local sessions and is always available inside remote agent sessions. In a remote session, newt cmd can reach your computer’s clipboard and applications, so it works only when the session has access to this host; the other commands always work.