-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terminal activity indicator/alert when in background #7955
Comments
@j4james @zadjii-msft, |
I don't use a mac, but it seems iterm has a feature like this based on this information in this post. I've seen it in one other terminal emulator as well (SecureCRT I think). |
So, if this was to be implemented, and someone were to run something like a build that was displaying output constantly, wouldn't the indicator just be perpetually on? I don't really see the value in that, so there would have to be some sort of contextual way to enable/disable this. Though I guess reading that post, the indeterminate progress wheel as the indicator kinda makes sense - then the wheel stopping spinning would be the indicator that the process stopped running. My only great disappointment is there's not a good way for the terminal to display that indicator in the taskbar icon. We could easily add the indicator to the tab itself, but that would only be visible if the window was visible. (see also #3991) I personally think that this is better served by a combo of #3004 and having the client application emit the corresponding sequence. Maybe we could combine the activity spinner with the indeterminate taskbar state. Add a setting to allow the user to show indeterminate state in the taskbar while the indicator is active. We'd probably want that to be overridden by whatever the client sets from the VT sequences as described in #3004, but that's not out of the realm of possibility. Obviously we'll want a setting both for enabling/disabling the indicator at all, and then a second one(?) for mirroring the indicator to the taskbar. That would only work if the "in progress" pane is the active pane, but that's good enough for most use cases I'd bet. The longer I think about this, the more I've gone from "this seems ridiculous" to "we need to have this" |
Impressive how you are able to keep these "related" issues in the head and can call out at will and tie them together :-) In terms of usage, one could slice the end user requirement/experience in a couple of ways:
It seems the UI options you've suggested above covers both (or all 4) cases - please correct me if I'm wrong. Thanks as always. |
Both tmux and GNU Screen have a "silence" feature that notifies the user when there has been no new output for some time. In GNU Screen, the default is 30 seconds if enabled. |
Most of the terminal emulator apps issue some kind of indicator when the buffer changes and it's not in the active view. For example you can be running a long task in one tab and have another active tab and there should be an indication that there was a buffer change in any other tab. Like the tab title change from black to red foreground (red font). That's extremely important. |
I think this is a reasonable feature request. AFAIK, iTerm2 has this and I think it's useful. The taskbar indicator (OSC 9;4) is useful, but not suitable for multiple tabs.
Well yeah. But this does not bother me. |
As an example from the wild: Gnome's Console will actually send a desktop notification when the commandline finishes, if it's in the background. I don't think we could possibly get the actual commandline without much deeper shell integration (or heuristics based on typing enter, which I don't love). See also: |
How about something like this? A little dot appears next to the tab's title once new output was received and the tab is in the background. I also like @naikel's suggestion: I guess this could be configurable. Having no way to tell something has changed is a real problem: I have to switch tabs myself from time to time to see if something happened: I shouldn't have to do that. |
Is this being worked on? Or is there any plugin or alternative to achieve this? |
Nope, not yet. We haven't really settled on a design for this feature yet. Do you have a particular design in mind? Rereading this thread, I think I like the design in #7955 (comment) the most myself. Kinda like the tab bell notification we have currently when an inactive tab BELs, but, just for any output. Maybe something like: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced#bell-notification-style
and these can be combined with each other, like the bell settings. of course, In another thread, I believe there was discussion of I suppose Okay, more official spec: "OutputNotificationStyle": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"taskbar",
"audible",
"tab",
"notification"
]
}
},
{
"type": "string",
"enum": [
"taskbar",
"audible",
"tab",
"notification"
"all",
"none"
]
}
]
},
// ...
"Profile": {
"properties": {
// ...
"notifyOnInactiveOutput": {
"$ref": "#/$defs/OutputNotificationStyle",
"default": "none",
"description": "When this profile receives output in an inactive tab, raise a notification of the given type"
},
"notifyOnNextPrompt": {
"$ref": "#/$defs/OutputNotificationStyle",
"default": "none",
"description": "When the commandline application returns to the prompt, raise a notification of the given type. This requires shell integration to be enabled."
},
Try to combine with #1620, #8449. These are a pair of related scenarios:
Proposal 1: not so good"onInactiveOutput":
{
"style": ["taskbar", "audible", "tab", "notification"],
"progress": "default|automatic"
} Eh, wait, I don't love that. Cause:
proposal 2I think we can combine these to some setting that tells the control to report "progress" even if no progress was set:
"autoDetectRunningCommand": "disabled|automatic|progress" NOTES:
hackathon 2023 notes:
Something's sorta wrong when a connection first starts. Footnotes
|
Is this a toast notification or some thing like that? If yes, perhaps it can show the window title and any other useful info in it, and when clicked on the notification could switch to the window (raise to foreground) that the notification is for? |
note to self: an example of the 598c839eea0d975f.1.mp4credit: |
@naikel This is the exact thing I want, can you please explain how you enabled this and which unix terminal you are using? |
@maddishah at the time I modified the source code of this project for that, but I never send a pull request for it because it seemed nobody liked the design for it. It's long gone now. |
This functionality is very useful for long running tasks, and works extremely well with Git Bash's MINGW64 terminal, such that sleep 5 && tput bel Will bring the window back into focus once it's completed even if it was previously minimized. This might be a bit of a different use case, but the bell behaviour is more direct in that the program requires focus or attention of some kind, and the user should react accordingly. |
Just passing to say that I've been working with computers for over 30 years. And, throughout that time, I've often dreamed of having something like this. Especially... right now, as I wait for a long build task to finish. I'm eager to see this one become a reality! |
Problem:
Often times there's a command invoked on the shell prompt that's long running and takes a while, and the user switches to a different window and puts the terminal window in the background while waiting for this command/job to complete. When the job completes, user is unaware this happened until the terminal window is switched back to (foreground) or user periodically peeks to see if the job has completed.
Suggestion:
If there can be some some sort of visual indicator or alert when there is terminal activity to suggest there is new output logged into the terminal, it would provide a cue to the user that the job may be complete. If the long running job happens to continually output to the terminal this wouldn't be as useful, but most times there's a job that runs for an unpredictable amount of time and then terminal returns to the prompt.
The indicator could be a temporary flashing of the window title in the task bar, and/or a change to a different shade/color until user has acknowledged the alert. Or may be display a badge on the title bar.
Alternatives considered that are not viable or great:
Terminal output based activity detection and alert seems native and logical place to do this without relying on any other system features.
The text was updated successfully, but these errors were encountered: