Skip to content

Notification after a long running command finishes #6372

Open

Description

Description of the new feature/enhancement

It would be awesome to add an option for a notification bubble or sound after a long running command. Long running command can be configurable but a sane default could be 10 seconds.

The scenario for this would to switch users from a pull to push model. Without notifications, a user would have to constantly "pull" their terminal to see if their command is done. Switching to push removes the cognitive overhead of having to constantly pull and instead be pushed only once the command is done running.

Current workarounds

  • Run a script that creates a notification after the command is done: long_command; notification.py

Extra asks

Beyond allowing for notifications, it would also be helpful if users were provided a hook. Here are some scenarios the hook can cover:

  • Hitting an API to report the run length of the command (Useful for engineering systems)
  • Changing the color of your smart LEDs (Think of all the things Makers could do!)
  • Context aware notifications (If the script name contains 'foo' then do then, otherwise do that

Other Terminal support

Proposed technical implementation details (optional)

Activity

  1. added
    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.
    on Jun 5, 2020
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 5, 2020
  3. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 5, 2020
  4. added
    Area-ExtensibilityA feature that would ideally be fulfilled by us having an extension model.
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 9, 2020
  5. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 9, 2020
  6. zadjii-msft commented on Nov 22, 2022

    @zadjii-msft
    Member

    To try and tease this apart a bit:

    • Send Desktop Notification via VT Sequence (OSC777) #7718 is tracking the ability to send a notification from a commandline script. That's something that could easily be leveraged by notify.py (or whatever) to send a notification when the build finishes.
    • "Alert on next mark" is a really great idea. I think I want this thread to track that feature now.
    • terminal activity indicator/alert when in background #7955 is also tracking kinda the inverse of this thread.
      • This thread is "I want a notification after some time, when a command finishes"
      • That thread is "I want a notification if there's any output in an inactive tab"

    I might want to spend a hot minute syncing these two designs with each other - we definitely don't want to send a notification for BOTH "there was new output" and "that output was the next mark". I suppose if both settings are enabled, we can defer to "there was output".

  7. Roy3838 commented on Sep 14, 2026

    @Roy3838

    Hi!
    While this is open, I built a free/FOSS tool that covers this in the meantime:
    https://github.com/Roy3838/Observer It ships a CLI wrapper, so something like observe npm run build will ping or call you when the command exits. Runs locally, nothing leaves your machine. Any questions feel free to reach out! :D

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ExtensibilityA feature that would ideally be fulfilled by us having an extension model.In-PRThis issue has a related PRIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions