iTerm2 tabs and panes automation. Create multiple tabs and split panes with JavaScript code.
yarn add @kykungz/itermy
import itermy from '@kykungz/itermy'
itermy()
// New tab with 2 vertically split panes
.newTab([
{ commands: `ls` }, // Single command
{ commands: [`cd ~/Desktop`, `ls`] }, // Sequential commands
])
// New tab with 2 horizontally split panes and 1 pane on the right
.newTab([
[
{ commands: `ls` },
{ commands: `ls` }
],
{ commands: `ls` }
])
.start()
.------------------.------------------.
| (0) | (1) |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
'------------------'------------------'
import itermy from '@kykungz/itermy'
itermy()
.newTab([
{ commands: `echo '0'` },
{ commands: `echo '1'` }
])
.start()
.------------.-------------.------------.
| (0) | (1) | (2) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
'------------'-------------'------------'
import itermy from '@kykungz/itermy'
itermy()
.newTab([
{ commands: `echo '0'` }
{ commands: `echo '1'` }
{ commands: `echo '2'` }
])
.start()
.------------------.------------------.
| (0) | (2) |
| | |
| | |
| | |
|------------------| |
| (1) | |
| | |
| | |
| | |
'------------------'------------------'
import itermy from '@kykungz/itermy'
itermy()
.newTab([
[
{ commands: `echo '0'` },
{ commands: `echo '1'` }
],
{ commands: `echo '2'` }
])
.start()
.------------------.------------------.
| (0) | (2) |
| | |
| | |
| | |
|------------------|------------------|
| (1) | (3) |
| | |
| | |
| | |
'------------------'------------------'
import itermy from '@kykungz/itermy'
itermy()
.newTab([
[
{ commands: `echo '0'` },
{ commands: `echo '1'` }
],
[
{ commands: `echo '2'` },
{ commands: `echo '3'` },
]
])
.start()