Skip to content

Ghostty graphical progress bar option#946

Open
mielpeeters wants to merge 2 commits into
aome510:masterfrom
mielpeeters:feat/ghostty-progress
Open

Ghostty graphical progress bar option#946
mielpeeters wants to merge 2 commits into
aome510:masterfrom
mielpeeters:feat/ghostty-progress

Conversation

@mielpeeters
Copy link
Copy Markdown
Contributor

using ConEmu escape sequences, draw a graphical progress bar as described in
https://ghostty.org/docs/install/release-notes/1-2-0#graphical-progress-bars

This can be enabled by setting progress_bar_type = "Terminal" in the config.

The left click handler for seeking has also been updated such that it responds when clicking the topmost row, just below the terminal progress bar.

Preview

image

Seeking

Screencast.From.2026-03-18.14-23-56.mp4

using ConEmu escape sequences, draw a graphical progress bar as
described in
https://ghostty.org/docs/install/release-notes/1-2-0#graphical-progress-bars

This can be enabled by setting `progress_bar_type = "EscapeSequence"` in
the config
pub enum ProgressBarType {
Line,
Rectangle,
Terminal,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this only work on ghosty terminal? Name it Terminal implies it works for other terminals as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on anstyle_progress::supports_term_progress, which cargo uses to determine whether the terminal running it supports this feature, it is supported for:

  • iTerm2 v3.6.6+ if TERM_FEATURES includes 'P'
  • WezTerm
  • Ghostty v1.2.0+
  • Windows Terminal
  • ConEmu
  • Ptyxis v48.0+

It's not universal, so calling it Terminal oversells it a bit indeed.

@jack-mil
Copy link
Copy Markdown

Some other Windows terminal emulators use this escape sequence, but they display progress in the taskbar app icon.

The Linux Kitty terminal rejected adding support. https://redirect.github.com/kovidgoyal/kitty/issues/3679

@mielpeeters
Copy link
Copy Markdown
Contributor Author

Some other Windows terminal emulators use this escape sequence, but they display progress in the taskbar app icon.

@jack-mil I didn't realize Windows Terminal shows the progress in the taskbar.
This means that the seeking behaviour no longer makes sense in that case.

@aome510 I suggest auto-detecting support using anstyle_progress's supports_term_progress, just like cargo does, and removing the Terminal option from ProgressBarType; either always printing the escape sequences when supported, or adding a new opt-in config option.

@aome510
Copy link
Copy Markdown
Owner

aome510 commented Mar 30, 2026

I suggest auto-detecting support using anstyle_progress's supports_term_progress, just like cargo does, and removing the Terminal option from ProgressBarType; either always printing the escape sequences when supported, or adding a new opt-in config option.

Maybe we can keep Terminal name and implement a check-for-support function which will crash (with helpful error message) when the user's terminal doesn't support it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants