JuliaLogging / TerminalLoggers.jl

Logging sinks and utilites for interactive terminals
MIT License
41 stars 10 forks source link

Support Windows Terminal progress UI #47

Open davidanthoff opened 1 year ago

davidanthoff commented 1 year ago

Windows Terminal added support for ConEmu's OSC 9;4 escape sequences a while ago to trigger various nice UI things in the terminal. In particular, one can show a progress bar in the task bar and on the tab for a given Julia instance. I think the best place to add support for that would be here? Essentially all one has to do is emit various escape sequences if on Windows, and it should all work.

Couple questions:

Some screenshots follow.

Showing a 40% progress in the tab and on the taskbar:

image

image

Showing an error state on the taskbar:

image

Showing the "something is running" on the taskbar, note that this is animated and the little bar is constantly moving:

image

And then there is also a yellow state, not clear to me what we would use that for:

image

c42f commented 1 year ago

In particular, one can show a progress bar in the task bar and on the tab for a given Julia instance. I think the best place to add support for that would be here?

Sure, sounds great!

There is only one per terminal window, I'm a bit lost how we can handle that?

There's no obviously good way as the multiple progress bars might be unrelated to each other. Maybe we just show the oldest one which was added to the list. That's more likely to represent overall progress if there's nested progress bars.

The problem is that stuff seems more like REPL integration, though

Yes I think that part would have to go in the REPL stdlib