Skip to content

Commit f0dcee4

Browse files
committed
Add example for tmux options
See also: #65
1 parent 0359731 commit f0dcee4

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

doc/examples.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,15 @@ Environment variable replacing
166166
------------------------------
167167

168168
tmuxp will replace environment variables wrapped in curly brackets
169-
for the following variables:
169+
for values of these settings:
170170

171171
- ``start_directory``
172172
- ``before_script``
173173
- ``session_name``
174174
- ``window_name``
175175
- ``shell_command_before``
176+
- ``global_options``
177+
- ``options`` in session scope and window scope
176178

177179
tmuxp replaces these variables before-hand with variables in the
178180
terminal ``tmuxp`` invokes in.
@@ -278,19 +280,25 @@ JSON
278280
.. literalinclude:: ../examples/window-index.json
279281
:language: json
280282

281-
Automatic Rename
283+
Set tmux options
282284
----------------
283285

286+
Works with global (server-wide) options, session options
287+
and window options.
288+
289+
Including ``automatic-rename``, ``default-shell``,
290+
``default-command``, etc.
291+
284292
YAML
285293
~~~~
286294

287-
.. literalinclude:: ../examples/automatic-rename.yaml
295+
.. literalinclude:: ../examples/options.yaml
288296
:language: yaml
289297

290298
JSON
291299
~~~~
292300

293-
.. literalinclude:: ../examples/automatic-rename.json
301+
.. literalinclude:: ../examples/options.json
294302
:language: json
295303

296304
Main pane height
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,12 @@
2626
}
2727
],
2828
"session_name": "test window options",
29-
"start_directory": "~"
29+
"start_directory": "~",
30+
"global_options": {
31+
"default-shell": "/bin/sh",
32+
"default-command": "/bin/sh"
33+
},
34+
"options": {
35+
"main-pane-height": "${MAIN_PANE_HEIGHT}"
36+
}
3037
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
session_name: test window options
22
start_directory: '~'
3+
global_options:
4+
default-shell: /bin/sh
5+
default-command: /bin/sh
6+
options:
7+
main-pane-height: ${MAIN_PANE_HEIGHT} # works with en variables
38
windows:
49
- layout: main-horizontal
510
options:

0 commit comments

Comments
 (0)