Skip to content

Commit 5d6e15f

Browse files
committed
docs(examples): main-pane-height percentage
1 parent 654360e commit 5d6e15f

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

docs/configuration/examples.md

+24
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,30 @@ pane during creation.
554554

555555
## Main pane height
556556

557+
### Percentage
558+
559+
:::{versionadded} 1.46.0
560+
561+
Before this, tmuxp layouts would not detect the terminal's size.
562+
563+
:::
564+
565+
````{tab} YAML
566+
```{literalinclude} ../../examples/main-pane-height-percentage.yaml
567+
:language: yaml
568+
569+
```
570+
````
571+
572+
````{tab} JSON
573+
```{literalinclude} ../../examples/main-pane-height-percentage.json
574+
:language: json
575+
576+
```
577+
````
578+
579+
### Rows
580+
557581
````{tab} YAML
558582
```{literalinclude} ../../examples/main-pane-height.yaml
559583
:language: yaml
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"windows": [
3+
{
4+
"panes": [
5+
{
6+
"shell_command": [
7+
"top"
8+
],
9+
"start_directory": "~"
10+
},
11+
{
12+
"shell_command": [
13+
"echo \"hey\""
14+
]
15+
},
16+
{
17+
"shell_command": [
18+
"echo \"moo\""
19+
]
20+
}
21+
],
22+
"layout": "main-horizontal",
23+
"options": {
24+
"main-pane-height": "67%"
25+
},
26+
"window_name": "editor"
27+
}
28+
],
29+
"session_name": "main pane height",
30+
"start_directory": "~"
31+
}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
session_name: main-pane-height
2+
start_directory: "~"
3+
windows:
4+
- layout: main-horizontal
5+
options:
6+
main-pane-height: 67%
7+
panes:
8+
- shell_command:
9+
- top
10+
start_directory: "~"
11+
- shell_command:
12+
- echo "hey"
13+
- shell_command:
14+
- echo "moo"
15+
window_name: my window name

0 commit comments

Comments
 (0)