[PR #8055] Implement ConEmu's OSC 9;4 to set the taskbar progress indicator #27075

Open
opened 2026-01-31 09:19:51 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8055

State: closed
Merged: Yes


This commit implements the OSC 9;4 sequence per the ConEmu style.

sequence description
ESC ] 9 ; 4 ; st ; pr ST Set progress state on taskbar and tab.
When st is:
0: remove progress.
1: set progress value to pr (number, 0-100).
2: set the taskbar to the "Error" state
3: set the taskbar to the "Indeterminate" state
4: set the taskbar to the "Warning" state

We've also extended this with:

  • st 3: set indeterminate state
  • st 4: set paused state

We handle multiple tabs sending the sequence by using the the last focused
control's taskbar state/progress.

Upon receiving the sequence in TerminalApi, we send an event that gets caught
by TerminalPage. TerminalPage then fires another event that gets caught by
AppHost and that's where we set the taskbar progress.

Closes #3004

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8055 **State:** closed **Merged:** Yes --- This commit implements the OSC 9;4 sequence per the [ConEmu style]. | sequence | description | | ------------ | ------------ | | `ESC ] 9 ; 4 ; st ; pr ST` | Set progress state on taskbar and tab. | | | When `st` is: | | | | | | `0`: remove progress. | | | `1`: set progress value to `pr` (number, 0-100). | | | `2`: set the taskbar to the "Error" state | | | `3`: set the taskbar to the "Indeterminate" state | | | `4`: set the taskbar to the "Warning" state | We've also extended this with: * st 3: set indeterminate state * st 4: set paused state We handle multiple tabs sending the sequence by using the the last focused control's taskbar state/progress. Upon receiving the sequence in `TerminalApi`, we send an event that gets caught by `TerminalPage`. `TerminalPage` then fires another event that gets caught by `AppHost` and that's where we set the taskbar progress. Closes #3004 [ConEmu style]: https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
claunia added the pull-request label 2026-01-31 09:19:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27075