Replies: 1 comment
-
|
If it really doesn't break terminals that don't support it then I don't see why not. It's a nice feature. Possibly this belongs in Rich. It could also be integrated into Rich's progress bars. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What problem are you trying to solve?
Some terminal emulators support the
OSC 9;4progress-reporting sequence, which lets CLI applications report progress to the terminal UI itself. Terminals may render this in the tab, taskbar, dock, or other chrome, rather than inside the terminal viewport.The sequence is commonly documented as:
Where
<state>is typically0clear,1normal progress,2error,3indeterminate, and4warning;<progress>is0–100when applicable.This is useful for long-running Textual apps where the user may switch tabs/windows but still wants to see that the app is progressing.
What solution would you like?
It would be useful for Textual to expose a small API for setting and clearing terminal-level progress indicators, for example something along these lines:
Textual could emit
OSC 9;4when running in a terminal that supports it, and treat it as a no-op or best-effort escape sequence elsewhere.Alternatives considered
Applications can write the raw escape sequence themselves, but this has a few downsides:
Prior art
Windows Terminal documents support for the ConEmu
OSC 9;4progress-bar sequence:https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
Other terminals and terminal libraries have discussed or added similar support, including VTE/GNOME Terminal, iTerm2, Ghostty, and WezTerm.
Beta Was this translation helpful? Give feedback.
All reactions