Skip to content

Instantly share code, notes, and snippets.

@matti
Created October 27, 2019 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matti/a34d1a96113869df789ccef96e22c695 to your computer and use it in GitHub Desktop.
Save matti/a34d1a96113869df789ccef96e22c695 to your computer and use it in GitHub Desktop.
iterm2 quad panes
#!/usr/bin/env python3.7
import asyncio
import iterm2
async def main(connection):
app = await iterm2.async_get_app(connection)
topLeft = app.current_terminal_window.current_tab.current_session
topRight = await topLeft.async_split_pane(vertical=True)
bottomLeft = await topLeft.async_split_pane(vertical=False)
bottomRight = await topRight.async_split_pane(vertical=False)
await topLeft.async_activate()
iterm2.run_until_complete(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment