I have a Terminal window with a dozen named tabs open.
I would like to save the current configuration and have it restored with names and directories.
Is there a way to do this?
|
I have a Terminal window with a dozen named tabs open. I would like to save the current configuration and have it restored with names and directories. Is there a way to do this? |
|||||||||||||||||||||
|
|
To save configuration into
To load it back:
UPDATE After playing around with bash I created following script which stores tab names into file
To assign names properly you have to run it from first tab of your terminal. Loading same as before:
EXPLANATION: I can use following to get tab name:
I can use following to jump to next tab:
I'm getting number of tabs after grepping configuration file I saved before:
So I can iterate over tabs inside a loop. I have to add "Title=titlename" entry for each tab configuration section in file saved before. To do so, first I'm creating an array of line numbers where I'll be adding lines.
I'm adding "Title=titlename" line inside of loop iterating over tabs:
|
|||||||||||||||||||||
|
|
An alternative is to just use Byobu. Press F2 to open new terminals inside it. Use F3 and F4 to switch left and right between terminals. Close the GUI window anytime you want. When you reopen Byobu all your terminals are restored :) |
|||||||||||||
|
|
I tried the below options after restoring the saved settings and the Title is also restored properly.
This option avoid your initial title set to be overwritten. Hope This helps and a great script indeed. Save a lot of time whenever u reboot and I can happily reboot my virtual box frequently. Thanks!! |
|||
|
|
|
I Tried one more option, I changed my default title for Terminal to use the Intital value in
If You do this, there is no need to change your Terminal Profile. |
||||
|
|
|
I found a way to do it that I think is faster.
I made an alias with this command and it worked pretty fine for me. I just type On my
|
||||
|
|
|
Screen or Byobu are my preferred methods of managing complex workflow in the terminal, and both allow saving your configurations. |
|||
|
|
|
A little improvement to the existed script which also checks xdotool installed on system and adds variable for changing path
|
||||
|
|
|
Expanding on Nyakin's answer above, this script will work for multiple window and tab configurations and correctly save tab titles for all tabs that have them. This is currently tested on gnome-terminal 3.2 but could be configured for any terminal program with a similar save-config functionality. This requires the 'xprop', 'xdotool', and 'wmctrl' tools. Code:
|
|||
|
|
|
I've also looked for that feature in Gnome terminal but couldn't find it. The best option I found so far is to use konsole. It allows you to bookmark your tabs, so that you can get back to them by choosing them from a bookmarks menu. I hope this helps. |
|||
|
|
|
Similar to Yoga's method, Edit >> Profile Preferences >> Title and Command >>Title >> When terminal commands set their own titles: >> "Prepend initial title" Then execute: gnome-terminals --save-config=terminals-cfg close terminals windows open a new terminal, and in it execute: gnome-terminals --load-config=terminals-cfg Works good for me, all titles kept. |
|||
|
|
|
Hyper (https://github.com/zeit/hyper) is a good cross platform alternative written in JavaScript and bundled with Electron. There's a PR that is going to add support for session save/restore out of the box: https://github.com/zeit/hyper/pull/945 |
|||
|
|