summaryrefslogtreecommitdiff
path: root/src/termio/stream_handler.zig
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2025-10-01 23:48:08 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2025-10-02 12:40:40 -0500
commit07124dba64096a36a84b76cab05a937ea3e2aeac (patch)
tree11aa8dc19ca8841bdb96c29f8576a05313424e11 /src/termio/stream_handler.zig
parent9c8d2e577e2608c1218fa0630373039f0e126697 (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 'src/termio/stream_handler.zig')
-rw-r--r--src/termio/stream_handler.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/termio/stream_handler.zig b/src/termio/stream_handler.zig
index 2d90831f2..b2b2af3d0 100644
--- a/src/termio/stream_handler.zig
+++ b/src/termio/stream_handler.zig
@@ -1054,6 +1054,11 @@ pub const StreamHandler = struct {
pub inline fn endOfInput(self: *StreamHandler) !void {
self.terminal.markSemanticPrompt(.command);
+ self.surfaceMessageWriter(.start_command_timer);
+ }
+
+ pub inline fn endOfCommand(self: *StreamHandler, exit_code: ?u8) !void {
+ self.surfaceMessageWriter(.{ .stop_command_timer = exit_code });
}
pub fn reportPwd(self: *StreamHandler, url: []const u8) !void {