-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathlayouts.py
166 lines (159 loc) · 4.91 KB
/
layouts.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
from .._util import load_fixture
teamocil_yaml = load_fixture("config_teamocil/layouts.yaml")
teamocil_dict = {
"two-windows": {
"windows": [
{
"name": "foo",
"clear": True,
"root": "/foo",
"layout": "tiled",
"panes": [{"cmd": "echo 'foo'"}, {"cmd": "echo 'foo again'"}],
},
{
"name": "bar",
"root": "/bar",
"splits": [
{
"cmd": ["echo 'bar'", "echo 'bar in an array'"],
"target": "bottom-right",
},
{"cmd": "echo 'bar again'", "focus": True, "width": 50},
],
},
]
},
"two-windows-with-filters": {
"windows": [
{
"name": "foo",
"root": "/foo",
"filters": {
"before": ["echo first before filter", "echo second before filter"],
"after": ["echo first after filter", "echo second after filter"],
},
"panes": [
{"cmd": "echo 'foo'"},
{"cmd": "echo 'foo again'", "width": 50},
],
}
]
},
"two-windows-with-custom-command-options": {
"windows": [
{
"name": "foo",
"cmd_separator": "\n",
"with_env_var": False,
"clear": True,
"root": "/foo",
"layout": "tiled",
"panes": [{"cmd": "echo 'foo'"}, {"cmd": "echo 'foo again'"}],
},
{
"name": "bar",
"cmd_separator": " && ",
"with_env_var": True,
"root": "/bar",
"splits": [
{
"cmd": ["echo 'bar'", "echo 'bar in an array'"],
"target": "bottom-right",
},
{"cmd": "echo 'bar again'", "focus": True, "width": 50},
],
},
]
},
"three-windows-within-a-session": {
"session": {
"name": "my awesome session",
"windows": [
{"name": "first window", "panes": [{"cmd": "echo 'foo'"}]},
{"name": "second window", "panes": [{"cmd": "echo 'foo'"}]},
{"name": "third window", "panes": [{"cmd": "echo 'foo'"}]},
],
}
},
}
two_windows = {
"session_name": None,
"windows": [
{
"window_name": "foo",
"start_directory": "/foo",
"clear": True,
"layout": "tiled",
"panes": [
{"shell_command": "echo 'foo'"},
{"shell_command": "echo 'foo again'"},
],
},
{
"window_name": "bar",
"start_directory": "/bar",
"panes": [
{
"shell_command": ["echo 'bar'", "echo 'bar in an array'"],
"target": "bottom-right",
},
{"shell_command": "echo 'bar again'", "focus": True},
],
},
],
}
two_windows_with_filters = {
"session_name": None,
"windows": [
{
"window_name": "foo",
"start_directory": "/foo",
"shell_command_before": [
"echo first before filter",
"echo second before filter",
],
"shell_command_after": [
"echo first after filter",
"echo second after filter",
],
"panes": [
{"shell_command": "echo 'foo'"},
{"shell_command": "echo 'foo again'"},
],
}
],
}
two_windows_with_custom_command_options = {
"session_name": None,
"windows": [
{
"window_name": "foo",
"start_directory": "/foo",
"clear": True,
"layout": "tiled",
"panes": [
{"shell_command": "echo 'foo'"},
{"shell_command": "echo 'foo again'"},
],
},
{
"window_name": "bar",
"start_directory": "/bar",
"panes": [
{
"shell_command": ["echo 'bar'", "echo 'bar in an array'"],
"target": "bottom-right",
},
{"shell_command": "echo 'bar again'", "focus": True},
],
},
],
}
three_windows_within_a_session = {
"session_name": "my awesome session",
"windows": [
{"window_name": "first window", "panes": [{"shell_command": "echo 'foo'"}]},
{"window_name": "second window", "panes": [{"shell_command": "echo 'foo'"}]},
{"window_name": "third window", "panes": [{"shell_command": "echo 'foo'"}]},
],
}