The vte library and gnome-terminal implemented recently the presentation progress indicators. It should look like this:
See: The circle icon on left of the second tab. The progress bar within the terminal is not of interest.
The API to control terminals are ANSI escape codes. Here specifically Operating System Commands (OSC). I tried using it with bash and echo to test it:
# Set the progress bar to 50% AND wait five seconds
echo -ne "\033]9;4;1;50\a" && sleep 5
Nothing visible happens. To be sure, I opened multiple tabs and added sleep 5
.
I recognized that setting the title of the terminal with
echo -en "\e]0; New TITLE\a" && sleep 5
works, but to avoid a mere brief flashing of the title, it is necessary to keep the command running for some time. Features like Control Sequence Introducers (CSI)
echo -en "\e[31m RED TEXT COLOR \e[0m DEFAULT TEXT COLOR\n"
also work. Mind the opening square bracket for CSI.
What am I doing wrong?
I'm running gnome-terminal 3.65.0
with vte 0.80.0
.
Thanks :)
Other references:
- Linux Console: Terminal Controls
- Julia Evans: Standards for ANSI escape codes
- ConEmu
- Microsoft
The vte library and gnome-terminal implemented recently the presentation progress indicators. It should look like this:
See: The circle icon on left of the second tab. The progress bar within the terminal is not of interest.
The API to control terminals are ANSI escape codes. Here specifically Operating System Commands (OSC). I tried using it with bash and echo to test it:
# Set the progress bar to 50% AND wait five seconds
echo -ne "\033]9;4;1;50\a" && sleep 5
Nothing visible happens. To be sure, I opened multiple tabs and added sleep 5
.
I recognized that setting the title of the terminal with
echo -en "\e]0; New TITLE\a" && sleep 5
works, but to avoid a mere brief flashing of the title, it is necessary to keep the command running for some time. Features like Control Sequence Introducers (CSI)
echo -en "\e[31m RED TEXT COLOR \e[0m DEFAULT TEXT COLOR\n"
also work. Mind the opening square bracket for CSI.
What am I doing wrong?
I'm running gnome-terminal 3.65.0
with vte 0.80.0
.
Thanks :)
Other references:
- Linux Console: Terminal Controls
- Julia Evans: Standards for ANSI escape codes
- ConEmu
- Microsoft
1 Answer
Reset to default 0It seems to me that VTE insists that the escape sequence ends in the official ST (\e\\
) rather than the nonstandard, unofficial BEL (\a
).