You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could have sworn we had an internal issue for this feature, but it never got migrated to github it appears....
FOUND IT! MSFT:18258406. Here are the relevant notes:
sequence
description
ESC ] 9 ; 4 ; st ; pr ST
Set progress state on Windows 7 taskbar and ConEmu title. When st is 0: remove progress. When st is 1: set progress value to pr (number, 0-100). When st is 2: set error state in progress on Windows 7 taskbar
We should probably also make sure that we support the TBPF_INDETERMINATE state - for something like our own bcz.cmd, where we don't know how long the operation will take.
In conpty mode, we should just pass these sequences through. There's a good amount of precedent for such sequences in the code already.
EDIT:
We should probably also have a couple settings for controlling this behavior:
showProgressInTaskbar (default true) to show the progress in the taskbar entry
showProgressInTab (default true) to show the progress in the tab itself.
This unfortunately conflicts with iterm2 and kitty use of OSC 9. Not the end of the world since neither supports the others notification, but definitely problematic.
This unfortunately conflicts with iterm2 and kitty use of OSC 9.
This was discussed in the PR and the terminal-wg issue that you linked. We reached the conclusion that WT probably wouldn't need to support iterm2's use of OSC 9, because if we did decide to implement notifications, we'd be more likely to go with OSC 777, since that's more widely supported.
Ok, but what about from the app developer's point of view? I just implemented the progress reporting in my library, and it's nice, thanks.
However, when I run my python script on kitty (and presumably iterm and others?) I get a ton of bogus desktop notifications "4;0;10", "4;0;20", etc.... instead. I had to put this BS in my code to work around it:
The least bad solution was probably using another number. As I read the discussion I realized Mr. Kovid is difficult, but I think he was right, we're not running out of integers any time soon.
It's a shame that iterm and conemu chose conflicting sequences ~ten years ago, and there's nothing we can do about that. But now that folks are at least in some communication there's no reason to double down on them. ;-)
As I read the discussion I realized Mr. Kovid is difficult, but I think he was right, we're not running out of integers any time soon.
If he really cared about the conflict, though, he didn't have to implement OSC 9 as a notification sequence - kitty already supports notification through another OSC sequence. And while I can sympathise with iTerm2, gnachman didn't seem particular attached to OSC 9 when the subject of notifications was being discussed, so it's quite possible he might drop it one day.
If you want consistency, I don't think the interpretation of escape sequences is a good place to be 😆
There's just already so much fragmentation in this space, especially with OSC sequences. No one really standardized them in the first place, so everyone just went wild west claiming whatever they wanted. Not much we can do about it now unfortunately.
Curious to me that iTerm2 chose OSC 9. Looks like the sequence must be very old in iTerm2: kovidgoyal/kitty#1474 (comment). Plus, ConEmu has been using OSC 9 as their prefix for years. So it really doesn't make sense to me to double down on OSC9 -> notification. It seems like it was an oversight when it was authored, the current author isn't attached to it, and there are better (non-conflicting alternatives).
We could also support the mintty version of the sequence if that doesn't conflict too bad. Don't see why not.
We could also support the mintty version of the sequence
If the point is to have a sequence that won't break kitty, then that probably isn't going to help. The last version I tested had issues with intermediates (at least some of them), which caused the sequences to be misinterpreted as something else. You may not get a notification popup, but you'll probably get some other weird breakage.
That only complicates the feature matrix, though. For mixmastamyk's "application developer" case, now it's just unreliable rather than "consistently different from iTerm2."
Man if only there was some sort of database that an app could use to look up "this is how you emit progress bar updates, this is how you send notifications, this is how you set the colors" for various different terminals 😝
Activity
zadjii-msft commentedon Oct 1, 2019
I could have sworn we had an internal issue for this feature, but it never got migrated to github it appears....
FOUND IT! MSFT:18258406. Here are the relevant notes:
ESC ] 9 ; 4 ; st ; pr STAlso related documentation: ITaskbarList3::SetProgressValue
We should probably also make sure that we support the
TBPF_INDETERMINATEstate - for something like our ownbcz.cmd, where we don't know how long the operation will take.In conpty mode, we should just pass these sequences through. There's a good amount of precedent for such sequences in the code already.
EDIT:
We should probably also have a couple settings for controlling this behavior:
showProgressInTaskbar(default true) to show the progress in the taskbar entryshowProgressInTab(default true) to show the progress in the tab itself.showProgressInTabcan probably be a follow up once microsoft/microsoft-ui-xaml#1386 is complete20 remaining items
mixmastamyk commentedon Feb 2, 2021
This unfortunately conflicts with iterm2 and kitty use of OSC 9. Not the end of the world since neither supports the others notification, but definitely problematic.
mintty commentedon Feb 2, 2021
Both could coexist as long as messages do not begin with "4;"...
j4james commentedon Feb 2, 2021
This was discussed in the PR and the terminal-wg issue that you linked. We reached the conclusion that WT probably wouldn't need to support iterm2's use of
OSC 9, because if we did decide to implement notifications, we'd be more likely to go withOSC 777, since that's more widely supported.mixmastamyk commentedon Feb 2, 2021
Ok, but what about from the app developer's point of view? I just implemented the progress reporting in my library, and it's nice, thanks.
However, when I run my python script on kitty (and presumably iterm and others?) I get a ton of bogus desktop notifications "4;0;10", "4;0;20", etc.... instead. I had to put this BS in my code to work around it:
The least bad solution was probably using another number. As I read the discussion I realized Mr. Kovid is difficult, but I think he was right, we're not running out of integers any time soon.
It's a shame that iterm and conemu chose conflicting sequences ~ten years ago, and there's nothing we can do about that. But now that folks are at least in some communication there's no reason to double down on them. ;-)
j4james commentedon Feb 2, 2021
If he really cared about the conflict, though, he didn't have to implement OSC 9 as a notification sequence - kitty already supports notification through another OSC sequence. And while I can sympathise with iTerm2, gnachman didn't seem particular attached to OSC 9 when the subject of notifications was being discussed, so it's quite possible he might drop it one day.
DHowett commentedon Feb 2, 2021
mintty commentedon Feb 2, 2021
mintty also implementes
CSIN%qas an alternative sequence;see https://github.com/mintty/mintty/wiki/CtrlSeqs#progress-bar but note the different numbering
mixmastamyk commentedon Feb 3, 2021
As an application developer, I'd like one sequence that works as many places as possible without conflicts…
zadjii-msft commentedon Feb 3, 2021
If you want consistency, I don't think the interpretation of escape sequences is a good place to be 😆
There's just already so much fragmentation in this space, especially with OSC sequences. No one really standardized them in the first place, so everyone just went wild west claiming whatever they wanted. Not much we can do about it now unfortunately.
Curious to me that iTerm2 chose OSC 9. Looks like the sequence must be very old in iTerm2: kovidgoyal/kitty#1474 (comment). Plus, ConEmu has been using OSC 9 as their prefix for years. So it really doesn't make sense to me to double down on OSC9 -> notification. It seems like it was an oversight when it was authored, the current author isn't attached to it, and there are better (non-conflicting alternatives).
We could also support the mintty version of the sequence if that doesn't conflict too bad. Don't see why not.
j4james commentedon Feb 4, 2021
If the point is to have a sequence that won't break kitty, then that probably isn't going to help. The last version I tested had issues with intermediates (at least some of them), which caused the sequences to be misinterpreted as something else. You may not get a notification popup, but you'll probably get some other weird breakage.
shmuelie commentedon Feb 4, 2021
When in doubt, offer the option to change which OSC is used in settings?
DHowett commentedon Feb 4, 2021
That only complicates the feature matrix, though. For mixmastamyk's "application developer" case, now it's just unreliable rather than "consistently different from iTerm2."
shmuelie commentedon Feb 4, 2021
That is true, would need a way to tell Terminal "this application uses OSC 9 for notifications, please do..."
zadjii-msft commentedon Feb 4, 2021
Man if only there was some sort of database that an app could use to look up "this is how you emit progress bar updates, this is how you send notifications, this is how you set the colors" for various different terminals 😝