@@ -9,65 +9,70 @@ def before_workspace_builder(self, session):
99 """
1010 Provide a session hook previous to creating the workspace.
1111
12+ This runs after the session has been created but before any of
13+ the windows/panes/commands are entered.
14+
1215 Parameters
1316 ----------
1417 session : :class:`libtmux.Session`
1518 session to hook into
16-
17- Notes
18- -----
19- This runs after the session has been created but before any of
20- the windows/panes/commands are entered.
2119 """
2220 pass
2321
2422 def on_window_create (self , window ):
2523 """
26- Provide a window hook previous to creating the window.
24+ Provide a window hook previous to doing anything with a window.
25+
26+ This runs runs before anything is created in the windows, like panes.
2727
2828 Parameters
2929 ----------
3030 window: :class:`libtmux.Window`
3131 window to hook into
32-
33- Notes
34- -----
35- This runs runs before anything is created in the windows, like panes.
3632 """
3733 pass
3834
3935 def after_window_finished (self , window ):
4036 """
4137 Provide a window hook after creating the window.
4238
39+ This runs after everything has been created in the window, including
40+ the panes and all of the commands for the panes. It also runs after the
41+ ``options_after`` has been applied to the window.
42+
4343 Parameters
4444 ----------
4545 window: :class:`libtmux.Window`
4646 window to hook into
47-
48- Notes
49- -----
50- This runs after everything has been created in the window, including
51- the paes and all of the commands for the panes. It also runs after the
52- ``options_after`` have been applied to the window.
5347 """
5448 pass
5549
5650 def before_script (self , session ):
5751 """
5852 Provide a session hook after the workspace has been built.
5953
54+ This runs after the workspace has been loaded with ``tmuxp load``. It
55+ augments instead of replaces the ``before_script`` section of the
56+ configuration.
57+
58+ This hook provides access to the LibTmux.session object for any
59+ behavior that would be used in the ``before_script`` section of the
60+ configuration file that needs access directly to the session object.
61+ This runs after the workspace has been loaded with ``tmuxp load``.
62+
63+ The hook augments, rather than replaces, the ``before_script`` section
64+ of the configuration. While it is possible to do all of the
65+ ``before_script`` configuration in this function, if a shell script
66+ is currently being used for the configuration, it would be cleaner to
67+ continue using the script in the ``before_section``.
68+
69+ If changes to the session need to be made prior to
70+ anything being built, please use ``before_workspace_builder`` instead.
71+
6072 Parameters
6173 ----------
6274 session : :class:`libtmux.Session`
6375 session to hook into
64-
65- Notes
66- -----
67- This runs after the workspace has been loaded with ``tmuxp load``. It
68- augments instead of replaces the ``before_script`` section of the
69- configuration. If changes to the session need to be made prior to
70- anything being built, please use ``before_workspace_builder`` instead.
7176 """
7277 pass
7378
0 commit comments