Metadata-Version: 2.1
Name: iterm-pane-spliter
Version: 0.0.2
Summary: Split iTerm2 panes from the command line
Author: Raz Luvaton
Requires-Python: >=3.8.1
Description-Content-Type: text/markdown
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: iterm2 ~= 2.7
Project-URL: Documentation, https://github.com/rluvaton/iterm-pane-spliter/tree/main/README.md
Project-URL: Source, https://github.com/rluvaton/iterm-pane-spliter
Project-URL: Tracker, https://github.com/rluvaton/iterm-pane-spliter/issues

# Split iterm panes by user defined structure

> TODO - publish to pypi, until published, use `python3 main.py` instead of `iterm-pane-spliter`

Split iterm panes by user defined structure from the command line.

## Usage
```bash
pip3 install -r requirements.txt
python3 main.py <json-structure>
```

the structure is a json Matrix, where each value is a different pane, the number of panes is the number of different values in the matrix.

the more values of the same number in the matrix, the bigger the pane will be.

## Examples

### 2 panes vertically split
For this:
```
-------------------
|        |        |
|        |        |
|   1    |    2   |
|        |        |
|        |        |
-------------------
```

the json structure you should provide is:
> Tip: just add more numbers to add more vertical panes
```json
[
  [1, 2]
]
```

so you will need to run:
```bash
iterm-pane-spliter "[[1, 2]]"
```

### 2 panes horizontally split
For this:
```
-------------------
|                 |
|       1         |
|                 |
-------------------
|                 |
|       2         |
|                 |
-------------------
```

the json structure you should provide is:
> Tip: just add more single value arrays to add more horizontal panes
```json
[
  [1],
  [2]
]
```

so you will need to run:
```bash
iterm-pane-spliter "[[1], [2]]"
```

### 2 panes vertically split 1 is bigger than 2
For this:
```
-------------------
|           |     |
|           |     |
|     1     |  2  |
|           |     |
|           |     |
-------------------
```

the json structure you should provide is:
```json
[
  [1, 1, 1, 2]
]
```

so you will need to run:
```bash
iterm-pane-spliter "[[1, 1, 1, 2]]"
```




### split to 4 equal panes
For this:
```
-------------------
|        |        |
|    1   |   2    |
|        |        |
-------------------
|        |        |
|    3   |   4    |
|        |        |
-------------------
```

the json structure you should provide is:
```json
[
  [1, 2],
  [3, 4]
]
```

so you will need to run:
```bash
iterm-pane-spliter "[[1, 2], [3, 4]]"
```


### Some crazy structure
```
-------------------
|     1     |     |
| --------- |  5  |
|     |     |     |
|     |  7  | --- |
|  2  |     |  3   |
|     | --- | --- |
|     |  8  |  6  |
| --- | --- | --- |
|        4        |
-------------------
```

the json structure you should provide is:
```json
[
    [1, 1, 5],
    [2, 7, 5],
    [2, 7, 3],
    [2, 8, 6],
    [4, 4, 4]
]
```

so you will need to run:
```bash
iterm-pane-spliter "[[1, 1, 5], [2, 7, 5], [2, 7, 3], [2, 8, 6], [4, 4, 4]]"
```




