File tree 3 files changed +11
-10
lines changed
3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ newer and tmux 3.0 or newer.
289
289
290
290
## ` if ` conditions
291
291
292
- tmuxp enables one to optionally open windows / panes based on coditions . The ` if ` conditions can appears in the configuration for window or pane.
292
+ tmuxp enables one to optionally open windows / panes based on conditions . The ` if ` conditions can appears in the configuration for window or pane.
293
293
294
294
```` {tab} YAML
295
295
@@ -320,7 +320,7 @@ should produce **only** a window with upper and lower split panes (others should
320
320
$ show_htop=false tmuxp load examples/if-conditions.yaml
321
321
```
322
322
323
- will insteads suppress the ` htop ` command pane and resulting in a different behaviour.
323
+ will instead suppress the ` htop ` command pane and resulting in a different behaviour.
324
324
325
325
## Focusing
326
326
Original file line number Diff line number Diff line change 7
7
"windows" : [
8
8
{
9
9
"window_name" : " window 1 ${ha} $Foo" ,
10
- "if" : {
11
- "shell" : " ${Foo}"
12
- },
10
+ "if" : " ${Foo}" ,
13
11
"panes" : [
14
12
{
15
13
"shell_command" : [
24
22
"panes" : [
25
23
{
26
24
"if" : {
27
- "python " : " 1+1==3 "
25
+ "shell " : " [ 5 -lt 4 ] "
28
26
},
29
27
"shell_command" : [
30
28
" echo the above is a false statement"
31
29
]
32
30
},
33
31
{
32
+ "if" : {
33
+ "python" : " import os; os.path.isdir('${PWD}')"
34
+ },
34
35
"shell_command" : [
35
- " echo no condition " ,
36
+ " echo \" checking for PWD (${PWD}) is a directory in python \" " ,
36
37
" python -m http.server"
37
38
]
38
39
},
39
40
{
40
41
"if" : " ${show_htop}" ,
41
42
"shell_command" : [
42
- " echo the above is a true statement (by default), but can be disabled on-demand" ,
43
+ " echo \" the above is a true statement (by default), but can be disabled on-demand\" " ,
43
44
" htop"
44
45
]
45
46
}
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ windows:
12
12
- echo neither should this $Foo
13
13
- window_name : window 2
14
14
panes :
15
- # should not shows up; using shell expression
15
+ # shell expression condition; should not show up
16
16
- if :
17
17
shell : ' [ 5 -lt 4 ]'
18
18
shell_command :
19
19
- echo the above is a false statement
20
- # python conditions
20
+ # python condition
21
21
- if :
22
22
python : import os; os.path.isdir('${PWD}')
23
23
shell_command :
You can’t perform that action at this time.
0 commit comments