I've been really wanting to auto store declarative pane layouts and default run commands for each project in a file and be able to recreate them programmatically to open / close a "project", like the Projects feature in Sublime.
For example, re-create a layout of multiple tabs with specific split panes for each project.
Previous attempts before this API were a struggle:
- You could almost do this with Saved Window Arrangements but not quite and there was no association to a project.
- You could also hack something with profiles if you're willing to make a profile for each project, but it still doesn't get you there.
- Bury Session is the closest which pretty much does what I want but it keeps all of the tabs running in the background. This can be a lot when you have 5-10+ tabs open each across multiple projects. No way to "sleep" a buried session that I could find.
- I also tried implementing it via the previous AppleScript API and it turned out to be a lot harder than expected to open "2 tabs with 3x2 split panes each and run commands x, y, z, ... in them". Then I called the AppleScripts via Python so I could template them more easily. I got about halfway there.
For example, re-create a layout of multiple tabs with specific split panes for each project.
Previous attempts before this API were a struggle:
- You could almost do this with Saved Window Arrangements but not quite and there was no association to a project.
- You could also hack something with profiles if you're willing to make a profile for each project, but it still doesn't get you there.
- Bury Session is the closest which pretty much does what I want but it keeps all of the tabs running in the background. This can be a lot when you have 5-10+ tabs open each across multiple projects. No way to "sleep" a buried session that I could find.
- I also tried implementing it via the previous AppleScript API and it turned out to be a lot harder than expected to open "2 tabs with 3x2 split panes each and run commands x, y, z, ... in them". Then I called the AppleScripts via Python so I could template them more easily. I got about halfway there.