Skip to content

Add settings for "notifying" on "activity"#20014

Open
carlos-zamora wants to merge 2 commits intodev/cazamor/toast/basefrom
dev/cazamor/toast/activity
Open

Add settings for "notifying" on "activity"#20014
carlos-zamora wants to merge 2 commits intodev/cazamor/toast/basefrom
dev/cazamor/toast/activity

Conversation

@carlos-zamora
Copy link
Copy Markdown
Member

@carlos-zamora carlos-zamora commented Mar 25, 2026

This PR implements the proposal in this comment. It adds 3 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 profile

For the notifyOn* settings, they take any combination of the following flags:

  • tab: flash the taskbar
  • audible: emit an audible bell (This will use the sounds from bellSounds, if specified)
  • taskbar: 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 it

For the autoDetectRunningCommand setting, we support:

  • disabled: don't do this
  • automatic: (requires shell integration) if we got a FTCS_COMMAND_EXECUTED  (133;C), then any output, set our progress state to indeterminate

Validated using this config:

"defaults":
{
	"autoDetectRunningCommand": "automatic",
	"autoMarkPrompts": true, // Needed even when your OMP config has shell integration enabled
	"rightClickContextMenu": true,
	"showMarksOnScrollbar": true
},
"list":
[
	{
		"commandline": "pwsh -nologo",
		"name": "Inactive Output",
		"notifyOnInactiveOutput":
		[
			"taskbar",
			"audible",
			"tab",
			"notification"
		]
	},
	{
		"commandline": "pwsh -nologo",
		"name": "Next Prompt",
		"notifyOnNextPrompt":
		[
			"taskbar",
			"audible",
			"tab",
			"notification"
		]
	},

Heavily based on #19935
Co-authored by @zadjii-msft

@carlos-zamora carlos-zamora force-pushed the dev/cazamor/toast/base branch from 4357c17 to aeb531f Compare March 25, 2026 17:29
@carlos-zamora carlos-zamora force-pushed the dev/cazamor/toast/activity branch from 47c0ae7 to 09c47c6 Compare March 25, 2026 21:51
@carlos-zamora carlos-zamora force-pushed the dev/cazamor/toast/activity branch from 09c47c6 to 98a4ccb Compare March 27, 2026 02:27
@carlos-zamora carlos-zamora marked this pull request as ready for review March 27, 2026 02:27
@carlos-zamora
Copy link
Copy Markdown
Member Author

Tested this out, it's pretty cool.
Reviewed it myself and using GHCP, everything looks good.

The only thing I can think of is the possibility of adding the experimental. prefix to these settings, but even then, I don't think that necessarily does anything. Like, when would it exit experimental?

So yeah, marked this as ready for review. Enjoy y'all! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant