4

So I want to open my workspace automatically when I open a profile for work, the problem is that it opens the windows (and windows splits) correctly but doesn't run any script to start my server, celery tasks, get into the correct folders, etc.

Is there a way to do this? even running a bash script would work for me, it doesn't have to be supported by iTerm.

Hassek
  • 8,715
  • 6
  • 47
  • 59

1 Answers1

3

I think you will find this article useful. It uses Apple Script to tell iTerm2 to open multiple windows and run commands in each of them.

http://90kts.com/2011/09/29/split-panes-and-remembered-sessions-in-iterm2/

jakeonrails
  • 1,885
  • 15
  • 37
  • I was looking further into iTerm2 help (right from the apple menu bar!) and it seems there is a Scripts directory that you can put applescripts into, which will then add a "Scripts" menu item to the menu bar, where you can select a script to run at any time. Sounds like it would be a great way to set up multiple project environments and switch back and forth between projects. – jakeonrails Aug 16 '12 at 17:55
  • great I just found it, always look into your program help hah, I will be posting my script to automate this thing when I get them done. Thanks for the tips! – Hassek Aug 16 '12 at 20:22
  • Whilst this link does answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Matt Ball Feb 16 '13 at 03:00