Your Layout Comes Back
You spend ten minutes getting a workspace right: an editor on the left, a dev server on the right, a test watcher below it, and a second tab for the database. Then you quit, or the machine restarts, or Nash updates. The next morning you build it all again.
Nash remembers it for you. It saves the layout of every window when it exits, and it lets you bring back a whole window, or a single tab, from the command palette.
What Nash Remembers
Nash records the shape of your work:
- Windows: the size, the title, and the order of the tabs.
- Tabs: names you gave them, their colors, and Zen Mode.
- Splits: the layout, the proportions, and which pane was active, zoomed, or folded.
- Panes: the working directory and the command that was running.
A restored pane is a new shell in the right directory. Nash does not bring back scrollback or the position of a window on your screen, and a program that already stopped stays stopped.
You Choose What Comes Back
Nash saves on its own, but it never reopens windows by itself. When you want your layout, open the command palette and run Restore Saved Session.
The dialog lists your saved windows with their tab and pane counts and a summary of what ran in them. Press SUPER+Enter (Cmd+Enter on macOS) to bring back a whole window. Press Enter to look inside the window and restore just one tab into the window you are in.
That second path matters on a busy day. You can pull back the one tab with your notes and leave the other eleven alone.
Every Way of Leaving Is Covered
People leave a terminal in many ways, and Nash saves for each of them:
- Quit from the menu or a key binding, on any platform.
- Log out, or shut down or restart, on macOS and Windows.
- Close your windows one at a time. Nash keeps the layout of the 8 most
recent closed windows and marks them
closedin the dialog. - Stop Nash with
SIGTERM,SIGINT,SIGHUP, orSIGQUIT, on macOS and Linux.
Closing the last window does not erase anything either. A snapshot with no windows never replaces a snapshot that has some.
The snapshot lives in ~/.config/nash/state/, so an application update does
not discard it. Run nash update, restart, and your layout is waiting.
Your Dev Server Starts Again
If a pane was running a command when Nash saved, Nash types that command back into the new shell and presses Enter. The dev server you had running in that pane starts up again without you.
This uses Nash's shell integration to know what was running. The dialog marks
each such pane with ▶ and the command, so you can see what will start. A
command with side effects runs again like any other command. Stop it before you
quit if you do not want that.
Try It
Nash 0.2.0 or newer restores sessions. Nash 0.8.1 or newer also keeps the layout of windows you close one at a time.
- Arrange a window with a few tabs and splits.
- Quit Nash from the menu.
- Start Nash again.
- Open the command palette and run Restore Saved Session.
- Press SUPER+Enter to restore the window.
Want a snapshot right now, without quitting? Run Save Window Session from the command palette. Nash does not save on a timer, so this is a good habit before a risky experiment.
When You Need the Programs to Keep Running
Session restore brings back your layout with fresh shells. If you need the programs themselves to survive a quit or an update, turn on the multiplexer. It keeps your panes alive in a background server, and a Nash window shows them again when you reconnect.
The two work well together, with one note about duplicate panes. The limits page explains it.
Learn More
- Session Restore: what Nash saves and when.
- The Restore Dialog: every key and what a restore does.
- Limits and Troubleshooting: what is not saved, and what to do when the dialog is empty.
- Update Nash from the command line: update without losing your place.
Your terminal should not ask you to rebuild your morning. Nash keeps your workspace, so you can get back to the work.
-Nash Team