❔ Using Windows Terminal progress bar in c#
How to make use of Windows Terminal progress bar (progress circle on tab next to tab's name), line WinGet does? I've tried searching through WinGet's source code but came up empty.
9 Replies
it's definitely not exclusive to winget
benchmarkdotnet uses it too
so you might want to look into powershell instead
or just the terminal i guess
https://github.com/PowerShell/PowerShell
https://github.com/microsoft/terminal
In a issue about that progress ring, I've found a string of characters to trigger it
^[]9;4;1;10^[\
Where 10 is progressGitHub
Feature Request: Taskbar progress indicator · Issue #3004 · microso...
Description of the new feature/enhancement Add a taskbar progress indicator for displaying the status of the current long running process (when possible). For example, this can be helpful to users ...
(first google hit for "windows terminal progress indicator")
https://github.com/dotnet/BenchmarkDotNet/pull/2158 also looks interesting
GitHub
Add taskbar progress by timcassell · Pull Request #2158 · dotnet/Be...
I initially tried to use a nuget package, but it does not support netstandard2.0. So I copied the relevant code from https://github.com/contre/Windows-API-Code-Pack-1.1 to Helpers/Taskbar to get th...
Definitely takes use of ANSI escape sequence
this means 10%
https://github.com/dotnet/BenchmarkDotNet/pull/2158/files#diff-ada7ae88864325b6a0d06cfc63729b11deaa0a9090fa4153c761d96a4318956fR192
Thanks to canton7 for linking towards it
https://github.com/dotnet/BenchmarkDotNet/pull/2158/files#diff-ada7ae88864325b6a0d06cfc63729b11deaa0a9090fa4153c761d96a4318956fR151-R168
Here also handles the state of the progress
Thanks, imo this should be documented in some way
it is
this is a standard that most terminal applications follow
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.