launch watcher: add on_cmd_startstop event

This commit is contained in:
Jin Liu
2023-11-14 15:30:52 +08:00
parent 24bb28b773
commit 0f52b69372
3 changed files with 28 additions and 4 deletions

View File

@@ -145,6 +145,10 @@ functions for the events you are interested in, for example:
# when a title change was requested via escape code from the program
# running in the terminal
def on_cmd_startstop(boss: Boss, window: Window, data: Dict[str, Any]) -> None:
# called when the shell starts/stops executing a command. Here
# data will contain is_start and time.
Every callback is passed a reference to the global ``Boss`` object as well as
the ``Window`` object the action is occurring on. The ``data`` object is a dict
that contains event dependent data. Some useful methods and attributes for the