-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathif-conditions.json
50 lines (50 loc) · 1.08 KB
/
if-conditions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"session_name": "if conditions test",
"environment": {
"Foo": "false",
"show_htop": "true"
},
"windows": [
{
"window_name": "window 1 ${ha} $Foo",
"if": "${Foo}",
"panes": [
{
"shell_command": [
"echo \"this shouldn't show up\""
]
},
"echo neither should this $Foo"
]
},
{
"window_name": "window 2",
"panes": [
{
"if": {
"shell": "[ 5 -lt 4 ]"
},
"shell_command": [
"echo the above is a false statement"
]
},
{
"if": {
"python": "import os; os.path.isdir('${PWD}')"
},
"shell_command": [
"echo \"checking for PWD (${PWD}) is a directory in python\"",
"python -m http.server"
]
},
{
"if": "${show_htop}",
"shell_command": [
"echo \"the above is a true statement (by default), but can be disabled on-demand\"",
"htop"
]
}
]
}
]
}