hb-view: Detect WezTerm and use iterm2 image protocol
Similar to the logic that detects iterm2, but look for TERM_PROGRAM=WezTerm which identifies wezterm is present. This allows hb-view to output an image directly to the terminal.
This commit is contained in:
parent
238e7dd2b6
commit
e3548c2069
|
@ -410,6 +410,12 @@ helper_cairo_create_context (double w, double h,
|
||||||
extension = "png";
|
extension = "png";
|
||||||
protocol = image_protocol_t::ITERM2;
|
protocol = image_protocol_t::ITERM2;
|
||||||
}
|
}
|
||||||
|
else if ((name = getenv ("TERM_PROGRAM")) != nullptr &&
|
||||||
|
0 == g_ascii_strcasecmp (name, "WezTerm"))
|
||||||
|
{
|
||||||
|
extension = "png";
|
||||||
|
protocol = image_protocol_t::ITERM2;
|
||||||
|
}
|
||||||
else if ((name = getenv ("TERM")) != nullptr &&
|
else if ((name = getenv ("TERM")) != nullptr &&
|
||||||
0 == g_ascii_strcasecmp (name, "xterm-kitty"))
|
0 == g_ascii_strcasecmp (name, "xterm-kitty"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue