Tilix: ansi escape for change background color not work

Created on 6 Jul 2018  Â·  9Comments  Â·  Source: gnunn1/tilix

hi, I'm trying tilix. I realized that the escape sequence to set the background color does not work. The sequences for setting the foreground and those for setting the extended colors work.

Examples:
echo -e "e]4;25;#00ff00a" assign green to extended color 25 work.
echo -e "e]10;#ffff00a" assign yellow to foreground color work.
echo -e "e] 11; # 0000ff a" assign the blue color to the background DOES NOT WORK, do nothing.

Tilix version 1.8.1-3 on Archlinux, i'm not able to test older versions these complains about libphobos-ldc-shared.so...
Is it supposed that tilix supports these escape sequences?

Upstream bug

All 9 comments

Tilix performs custom painting of the background in order to support transparency and badges. As a result tilix is using the color it thinks is correct which is not the case after the escape sequence is issued. Unfortunately VTE does not provide a method to report the colors in use AFAIK so I'm limited in what I can do to support this. I'll open an issue in VTE though for it.

In guake terminal there are two options --fgcolor and --bgcolor.
These two change foreground color and background color when invoked in the terminal.
Perhaps they can also be added in tilix like workaround.

Upstream is at https://gitlab.gnome.org/GNOME/vte/issues/9, the requested feature is now available in master (0-53 series).

This has been fixed thanks to VTE upstream and I've tested it with a local version in order to add the necessary code to tilix. Note you will not be able to use this fix until VTE 0.54 is released and GtkD is updated to use the new version so patience :)

This has been fixed thanks to VTE upstream and I've tested it with a local version in order to add the necessary code to tilix. Note you will not be able to use this fix until VTE 0.54 is released and GtkD is updated to use the new version so patience :)

@gnunn1 Thanks for the potential fix. However, I can't confirm it on my Tilix version. Maybe I'm not up to date but

vte-common 0.54.3-1
vte3 0.54.3-1 
gtkd 3.8.5-1
tilix 1.8.9-1

Shouldn't this be all up to date?
I tried echo -ne '\e]11;#FFFFFF\a'

vte3-0.56.0 here, base16-shell scripts still don't set the background in Tilix

Indeed echo -ne '\e]11;#ABCDEF\a' doesn't update the background color, although the same with 10 instead of 11 works for the foreground.

Looks like the switch to use vte_terminal_get_color_background_for_draw() is incomplete. Probably Tilix needs to be recompiled with COMPILE_VTE_BACKGROUND_COLOR = true in source/gx/tilix/constants.d.

[gnunn1 a year ago] Note you will not be able to use this fix until VTE 0.54 is released and GtkD is updated to use the new version so patience :)

I _guess_ GtkD has been updated since then. Maybe upstream Tilix could flip the default?

Thanks for the info!

Looks like getColorBackgroundForDraw is in GtkD now (and btw the source of GtkD can be regenerated at build time anyway, including when an OS package of GtkD is built).

../source/gx/tilix/terminal/exvte.d(34,1): Error: class `gx.tilix.terminal.exvte.ExtendedVTE` use of vte.Terminal.Terminal.getColorBackgroundForDraw(out RGBA color) is hidden by ExtendedVTE; use alias getColorBackgroundForDraw = Terminal.getColorBackgroundForDraw; to introduce base class overload set

so I've had to delete the override.

But the result is… the background is 100% transparent :D hm, no, full rebuild and it's fine!!

Hi ! this issue is closed, but I still don't understant how I can change background in Tilix by a shell command ...

Was this page helpful?
0 / 5 - 0 ratings