Windows and startup
Each Newt window is an independent session with its own panes, terminals, mounted filesystems, and operations. Newt remembers the last closed session for each target: local, elevated, each WSL distribution, and each remote target such as an SSH host or container.
Close a window
Section titled “Close a window”Press Mod + Shift + W to close a window, or Mod + Q to quit Newt. Closing a window ends its session: its terminals close, running operations are cancelled, and a remote or elevated session disconnects. Viewer and editor windows opened from it close too; an editor with unsaved changes asks first.
When any terminals are open (even idle ones) or operations are running, Newt asks before closing and says how many of each would be ended. Close (or Stop and Close) waits for operations to stop; Close Now closes without waiting. Quitting, including a macOS Dock quit or logout, asks the same for every window. Turn off Confirm Close under Behavior in Settings to close without asking.
Reopen a session
Section titled “Reopen a session”By default, opening the same target restores both pane directories, the focused entry in each pane, the active pane, and the window’s size, position, and maximized state. If several windows share a target, the most recently focused one wins.
The session is recorded when you close a window or quit Newt. On Windows and Linux, an operating-system logoff may end Newt before open windows are recorded, so close or quit Newt first if you want them restored.
Only locations on the target’s own filesystem are restored. A pane left inside an archive, search result, or mount returns to its last regular directory, or to the home directory. Mounts, navigation history, terminals, filters, and sorting are not restored. If a remembered directory no longer exists, Newt opens its nearest existing parent.
After a dropped connection, Reconnect returns both panes to where they were in that window, regardless of the restore settings.
Choose restore behavior
Section titled “Choose restore behavior”These settings are available under Behavior:
- Restore Pane Locations: restore all targets (the default), only sessions on this machine (local, elevated, and WSL), or none.
- New Window Location: inherit the current window’s panes (the default), use the last closed local window, or start at home. A new window opened from a remote session is local, so it uses the remembered local locations.
- Restore Window Geometry: remember window size and position per target, plus one size each for viewer and editor windows. Enabled by default.
Choose startup paths
Section titled “Choose startup paths”Paths on the command line take precedence over remembered locations:
newt ~/src ~/Downloadsnewt .newt --target ssh:build-host '~/logs'One path opens both panes there; two paths set the left and right panes. A
path to a file opens its parent directory with that file focused. Bare newt
restores the last local session, while newt . opens the shell’s current
directory. --cwd-left and --cwd-right set the panes as named options.
Relative paths are resolved against the launching shell’s directory for local
and elevated sessions. A leading ~ is expanded by the session target, so
quote it when the remote side should expand it.
Inside Newt’s terminal, newt is also the shell-integration command; if a
directory has the same name as one of its verbs, prefix it with ./.
Other command-line options
Section titled “Other command-line options”| Option | Effect |
|---|---|
--target <TARGET> | Open a session to a target, such as ssh:user@host, docker:<container>, kube:<pod>, or local. |
--profile <NAME> | Open a saved connection profile, by name or ID, in a new window. S3 and SFTP profiles open from Quick Connect instead. |
--elevated | Open an elevated session (Linux and Windows). |
--wsl [NAME] | Open a session in a WSL distribution, the default one without a name (Windows). |
--title <TEXT> | Show Newt [TEXT] in the window title. |
--config-dir <PATH> | Use another configuration directory. |
--print-config | Print the version, configuration directory, and agent and webview details, then exit. |
--version | Print the version, source revision, and platform. |
-v, -vv, -q | Log at debug or trace level, or only errors. RUST_LOG takes precedence when set. |
Only one of --target, --profile, --elevated, and --wsl can be used at
a time. See Remote sessions for the available
targets.
Stored state
Section titled “Stored state”Saved sessions are kept in sessions.json beside settings.toml, for up to
32 targets. Forgetting a Quick Connect recent also forgets that target’s saved
session. See
Settings and keybindings for
the configuration directory on each platform.