I do ruby on rails development and usually have three different tabs set up in my terminal; one for running tests, one for editing code and running commands, and one to run the rails server. It is not a big deal to set this up when I begin working, but it would be much cooler if I could just open the terminal and have everything already set up the way I like it (3 tabs all cd to the correct directory with the correct version of rails set in rvm). Is there a way to just take a snapshot of a terminal set up and hav it just open up like that all the time?
1 Answer
Assuming you mean gnome-terminal, from the man page:
--tab-with-profile=PROFILENAME
Open a tab in the window with the given profile. More than
one of these options can be provided, to open several tabs .
Which would make a script like ~/bin/cool-terminal
:
#!/bin/sh
gnome-terminal --tab-with-profile=edit --tab-with-profile=run ...
with some scripts to put in the profiles like
$ cat ~/bin/editor-tab
#!/bin/sh
chdir source_directory
...
exec $SHELL
Not exactly like taking a snapshot, but it can be done.