diff options
| author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2025-10-01 23:48:08 -0500 |
|---|---|---|
| committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2025-10-02 12:40:40 -0500 |
| commit | 07124dba64096a36a84b76cab05a937ea3e2aeac (patch) | |
| tree | 11aa8dc19ca8841bdb96c29f8576a05313424e11 /include | |
| parent | 9c8d2e577e2608c1218fa0630373039f0e126697 (diff) | |
core: add 'command finished' notifications
Fixes #8991
Uses OSC 133 esc sequences to keep track of how long commands take to
execute. If the user chooses, commands that take longer than a user
specified limit will trigger a notification. The user can choose between
a bell notification or a desktop notification.
Diffstat (limited to 'include')
| -rw-r--r-- | include/ghostty.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ghostty.h b/include/ghostty.h index 3f1e0c9d9..48836ee96 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -733,6 +733,14 @@ typedef struct { int8_t progress; } ghostty_action_progress_report_s; +// apprt.action.CommandFinished.C +typedef struct { + // -1 if no exit code was reported, otherwise 0-255 + int16_t exit_code; + // number of nanoseconds that command was running for + uint64_t duration; +} ghostty_action_command_finished_s; + // apprt.Action.Key typedef enum { GHOSTTY_ACTION_QUIT, @@ -788,6 +796,7 @@ typedef enum { GHOSTTY_ACTION_SHOW_CHILD_EXITED, GHOSTTY_ACTION_PROGRESS_REPORT, GHOSTTY_ACTION_SHOW_ON_SCREEN_KEYBOARD, + GHOSTTY_ACTION_COMMAND_FINISHED, } ghostty_action_tag_e; typedef union { @@ -819,6 +828,7 @@ typedef union { ghostty_action_close_tab_mode_e close_tab_mode; ghostty_surface_message_childexited_s child_exited; ghostty_action_progress_report_s progress_report; + ghostty_action_command_finished_s command_finished; } ghostty_action_u; typedef struct { |
