Skip to content

Commit 84d2799

Browse files
committed
more documentation for example_session
1 parent 49e8d4b commit 84d2799

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

etc/example_session.yaml

+21-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
---
22
common:
3+
# before_commands will be executed in each pane before doing anything else. Use this e.g. for
4+
# - sourcing an environment
5+
# - ssh-ing to another machine
36
before_commands:
4-
- fzirob change_environment # before commands can be specified global and per window
5-
default_window: README # This window will be visible when first attaching to the session
7+
- echo "This is a catmux window :)" # before commands can be specified global and per window
8+
9+
# The default window will be the one displayed when first connecting to the tmux session
10+
default_window: README
611
parameters:
7-
show_layouts: false
8-
replacement_param: world\!
12+
# Parameters specified here can be used below and they can be overwritten at runtime
13+
show_layouts: false # This parameter is used together with the if flag below
14+
replacement_param: world\! # Parameters can also be used as replacement templates
15+
16+
# Everything will be opened in windows. Windows can have multiple splits.
917
windows:
1018
- name: roscore
1119
splits:
1220
- commands:
1321
- roscore
1422
delay: 1 # Use this to wait before starting the next window
1523
- name: tiled
16-
if: show_layouts
17-
layout: tiled
24+
if: show_layouts # this window will only be started when the 'show_layouts' parameter is true
25+
layout: tiled # One can use the default layouts specified by tmux
1826
splits:
1927
- commands:
2028
- echo "hello"
@@ -44,12 +52,14 @@ windows:
4452
- commands:
4553
- echo "bottom"
4654
- name: README
47-
commands: # This looks a bit weird, but gives nicer colors
48-
- clear && tput bold && tput setaf 6 && roscat catmux readme_tmux.txt
49-
- tput sgr0
55+
splits:
56+
- commands:
57+
# This looks a bit weird, but gives nicer colors
58+
- clear && tput bold && tput setaf 6 && roscat catmux readme_tmux.txt
59+
- tput sgr0
5060
- name: no_split
51-
unless: show_layouts
52-
# If just one split is desired, just skip it
61+
unless: show_layouts # This window will only be displayed if 'show_layouts' is false
62+
# If just one split is desired, just skip it and write the commands directly
5363
commands:
5464
- echo "hello ${replacement_param}"
5565

0 commit comments

Comments
 (0)