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.
This commit is contained in:
Jeffrey C. Ollie
2025-10-01 23:48:08 -05:00
parent 9c8d2e577e
commit 07124dba64
12 changed files with 366 additions and 25 deletions

View File

@@ -96,6 +96,14 @@ pub const Message = union(enum) {
/// Report the progress of an action using a GUI element
progress_report: terminal.osc.Command.ProgressReport,
/// A command has started in the shell, start a timer.
start_command_timer,
/// A command has finished in the shell, stop the timer and send out
/// notifications as appropriate. The optional u8 is the exit code
/// of the command.
stop_command_timer: ?u8,
pub const ReportTitleStyle = enum {
csi_21_t,