Add settings for "notifying" on "activity"#19935
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| }; | ||
|
|
||
| [flags] | ||
| enum OutputNotificationStyle |
There was a problem hiding this comment.
These enums and the properties that use them are not consumed by TermControl; it seems like they are an app level concern and should not be present in the TermControl layer.
| } | ||
|
|
||
| // Method Description: | ||
| // - Raised when output stops being produced for ~100ms (debounced). |
There was a problem hiding this comment.
this is an implementation detail. also, isn't 100ms actually casually insane for something that should notify the user? the segments of a user's prompt might take that long to print
|
In general, I think I would prefer one PR that adds the notification infrastructure so that all the PRs can be stacked on top of that one, rather than them all depending on possibly the most contentious one of the stack. Ergo, rather than |
this is a totally reasonable take. I can work on that. |
This PR basically implements what I proposed in this comment(#7955 (comment)). It adds three settings:
notifyOnInactiveOutput: send a "notification"(below) of some kind when an inactive tab has new output.notifyOnNextPrompt: Similarly, but when we get a new prompt start (requires shell integration)autoDetectRunningCommand: attempt to automatically detect the progress state of this profilethe "notifications" of the
notifyOn*settings take a flags enum oftab|audible|taskbar|notification, which can be combined as you want. Their meanings are:taskbar: flash the taskbaraudible: emit an audible bell (This will use the sounds frombellSounds, if specified)tab: display an icon in the tab (ala terminal activity indicator/alert when in background #7955 (comment) ) (basically, similar to the bell icon)notification: send a desktop "toast" (read: notification). Clicking that notification will focus the tab that sent itand then for autodetect running commands, we only support:
disabled(default): don't do thisautomatic: (requires shell integration) if we got a FTCS_COMMAND_EXECUTED (133;C), then any output, set our progress state to indeterminateprogress, because walking the buffer sounded... not great.Profiles to test with:
notifyOnInactiveOutput)notifyOnNextPrompt)autoDetectRunningCommand)