Skip to content

Commit f262b44

Browse files
committed
docs(configuration): Basic configuration page
1 parent cd33f40 commit f262b44

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

docs/configuration/index.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,62 @@
1+
(config)=
2+
3+
(configuration)=
4+
15
# Configuration
26

7+
The configuration syntax is declarative and based on tmux's Session, Window and
8+
Panes hierarchy. Both JSON and YAML is accepted.
9+
10+
## Launching your session
11+
12+
When you have `tmuxp` installed in your environment alongside tmux, you can use:
13+
14+
```console
15+
$ tmuxp load ./path/to/file
16+
```
17+
18+
to load your workspace and launch directly into tmux.
19+
20+
In certain cases, tmuxp will try help you when:
21+
22+
- _If your session already exists_: tmuxp will prompt you to re-attach. It does this
23+
by checking if the configuration's `session_name` matches a session already
24+
running on the same server.
25+
- _If you're inside a tmux client already_, `tmuxp` will let you create a new session and switch to it, or append the windows to your existing
26+
session.
27+
28+
## What's in a config?
29+
30+
1. A session name: `session_name: your session`
31+
2. A list of _windows_
32+
3. A list of _panes_ for each window
33+
34+
````{tab} Basics
35+
36+
```yaml
37+
session_name: My session
38+
windows:
39+
- window_name: Window 1
40+
panes:
41+
- echo "pane 1"
42+
- echo "pane 2"
43+
```
44+
45+
````
46+
47+
````{tab} Smallest possible
48+
49+
```{literalinclude} ../../examples/minimal.yaml
50+
:language: yaml
51+
52+
```
53+
54+
As of 1.11.x.
55+
56+
````
57+
58+
## Reference and usage
59+
360
```{toctree}
461
562
environmental-variables

0 commit comments

Comments
 (0)