Notification after a long running command finishes #8841

Open
opened 2026-01-31 01:39:16 +00:00 by claunia · 1 comment
Owner

Originally created by @JohnPhamous on GitHub (Jun 5, 2020).

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)

Originally created by @JohnPhamous on GitHub (Jun 5, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> 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 * iTerm has this as a feature: https://www.iterm2.com/documentation-shell-integration.html#:~:text=Alert%20on%20next%20mark,in%20another%20window%20or%20tab. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureProduct-TerminalArea-Extensibility labels 2026-01-31 01:39:16 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 22, 2022):

To try and tease this apart a bit:

  • #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.
  • #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".

@zadjii-msft commented on GitHub (Nov 22, 2022): To try and tease this apart a bit: * #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. * #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".
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8841