|
25 | 25 |
|
26 | 26 | class WorkspaceBuilder(object):
|
27 | 27 |
|
28 |
| - """Load workspace from session :py:obj:`dict`. |
| 28 | + """ |
| 29 | + Load workspace from session :py:obj:`dict`. |
29 | 30 |
|
30 | 31 | Build tmux workspace from a configuration. Creates and names windows, sets
|
31 | 32 | options, splits windows into panes.
|
@@ -221,9 +222,16 @@ def iter_create_windows(self, s):
|
221 | 222 |
|
222 | 223 | Applies ``window_options`` to window.
|
223 | 224 |
|
224 |
| - :param session: :class:`libtmux.Session` from the config |
225 |
| - :rtype: tuple(:class:`libtmux.Window`, ``wconf``) |
| 225 | + Parameters |
| 226 | + ---------- |
| 227 | + session : :class:`libtmux.Session` |
| 228 | + session to create windows in |
226 | 229 |
|
| 230 | + Returns |
| 231 | + ------- |
| 232 | + tuple of (:class:`libtmux.Window`, ``wconf``) |
| 233 | + Newly created window, and the section from the tmuxp configuration |
| 234 | + that was used to create the window. |
227 | 235 | """
|
228 | 236 | for i, wconf in enumerate(self.sconf['windows'], start=1):
|
229 | 237 | if 'window_name' not in wconf:
|
@@ -286,6 +294,8 @@ def iter_create_panes(self, w, wconf):
|
286 | 294 | Returns
|
287 | 295 | -------
|
288 | 296 | tuple of (:class:`libtmux.Pane`, ``pconf``)
|
| 297 | + Newly created pane, and the section from the tmuxp configuration |
| 298 | + that was used to create the pane. |
289 | 299 | """
|
290 | 300 | assert(isinstance(w, Window))
|
291 | 301 |
|
@@ -332,10 +342,20 @@ def get_pane_start_directory():
|
332 | 342 |
|
333 | 343 | yield p, pconf
|
334 | 344 |
|
335 |
| - """ |
336 |
| - Applies window configurations relevant after window and pane creation. |
337 |
| - """ |
338 | 345 | def config_after_window(self, w, wconf):
|
| 346 | + """Actions to apply to window after window and pane finished. |
| 347 | +
|
| 348 | + When building a tmux session, sometimes its easier to postpone things |
| 349 | + like setting options until after things are already structurally |
| 350 | + prepared. |
| 351 | +
|
| 352 | + Parameters |
| 353 | + ---------- |
| 354 | + w : :class:`libtmux.Window` |
| 355 | + window to create panes for |
| 356 | + wconf : dict |
| 357 | + config section for window |
| 358 | + """ |
339 | 359 | if (
|
340 | 360 | 'options_after' in wconf and
|
341 | 361 | isinstance(wconf['options_after'], dict)
|
|
0 commit comments