Skip to content

Provide Taskbar progress indicator in Terminal #869

Closed

Description

Description of the new feature/enhancement

Provide OSC 9;4 sequence to provide status in Terminals for status.

Windows Terminal added support in microsoft/terminal#8055 for microsoft/terminal#3004 Taskbar progress indicator.

Activity

  1. added
    Issue-Feature
    on Apr 15, 2021
  2. ghost added
    Needs-Triage
    on Apr 15, 2021
  3. chausner commented on Apr 21, 2021

    @chausner
    Contributor

    This seems like a fun little feature I could potentially contribute, provided that JohnMcPMS hasn't already started working on this. Does this need a spec written first?

  4. denelon commented on Apr 21, 2021

    @denelon
    CollaboratorAuthor

    chausner I see this as a small work item. I'd be open to a PR against this issue :)

    We would love to have your support!

  5. JohnMcPMS commented on Apr 21, 2021

    @JohnMcPMS
    Member

    I have not, and I agree that it is both fun and should be a fairly small amount of work.

    Watch out for how it handles cancellation with CTRL+C; a single signal should be able to end with the proper sequence but I don't know how the second one (where we just exit process) will be handled by Terminal. Hopefully they track the source of this and end the progress when that process terminates.

    I think we did want to get this in over the next two weeks, so please let us know if you've started it.

  6. JohnMcPMS commented on Apr 21, 2021

    @JohnMcPMS
    Member

    And since neither of us explicitly answered the spec question; no, I don't see this as needing a spec.

  7. chausner commented on Apr 21, 2021

    @chausner
    Contributor

    Okay great, please assign me to this issue and I'll try to have a first implementation ready by next week.

    Watch out for how it handles cancellation with CTRL+C; a single signal should be able to end with the proper sequence but I don't know how the second one (where we just exit process) will be handled by Terminal. Hopefully they track the source of this and end the progress when that process terminates.

    I did a quick test with

    > python
    print("\x1b]9;4;2;40\x1b\\")
    quit()
    

    and neither Terminal nor ConEmu reset the progress on the task bar after the Python process exited. So when the winget process exits abnormally and if there is no event that would notify us before the process exit, there is probably no way to reset the progress. But normally, winget should not exit unexpectedly, right? And in the case of normal exit, we can always reset the progress.

  8. JohnMcPMS commented on Apr 21, 2021

    @JohnMcPMS
    Member

    The only "expected" exit would be the second CTRL+C, where we terminate the process because cooperative cancellation didn't happen fast enough for the user. We could probably even handle it in that case, but only of there is a clean "turn off progress" sequence. I think it is fine to leave that as future work since most places where we are in a progress state should also be the best at cancellation.

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

    Issue-Feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions