recognize Contour via XTVERSION, and turn on quadrants/rgb for it #1781

This commit is contained in:
nick black 2021-06-17 15:18:42 -04:00
parent c822aa345e
commit 7eedc7714d
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
5 changed files with 10 additions and 3 deletions

View File

@ -195,7 +195,7 @@ exporting the `COLORTERM` environment variable as `truecolor` or `24bit`.
Note that some terminals accept a 24-bit specification, but map it down to
fewer colors.
Since 2.3.1, 8bpc RGB is always enabled for Kitty, Alacritty, and foot.
TrueColor is always enabled for Kitty, Alacritty, Contour, and foot.
### Fonts

View File

@ -171,7 +171,7 @@ implementing `rgb` use the 3x8bpc model; XTerm for instance:
Thus emitting `setaf` with an RGB value close to black can result, when
using `xterm-direct`'s `setaf` and `rgb` definitions, in a bright ANSI color.
Since 2.3.1, DirectColor is always enabled for Kitty, Alacritty, and foot.
DirectColor is always enabled for Kitty, Alacritty, Contour, and foot.
## Problematic characters

View File

@ -726,6 +726,8 @@ stash_string(init_state* inits){
inits->qterm = TERMINAL_XTERM;
}else if(strncmp(inits->runstring, "WezTerm ", strlen("WezTerm ")) == 0){
inits->qterm = TERMINAL_WEZTERM;
}else if(strncmp(inits->runstring, "contour ", strlen("contour ")) == 0){
inits->qterm = TERMINAL_CONTOUR;
}
break;
}case STATE_XTGETTCAP_TERMNAME1:

View File

@ -134,6 +134,10 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd,
}
}else if(qterm == TERMINAL_XTERM){
termname = "XTerm";
}else if(qterm == TERMINAL_CONTOUR){
termname = "Contour";
ti->quadrants = true;
ti->RGBflag = true;
}else if(strcmp(termname, "linux") == 0){
termname = "Linux console";
ti->braille = false; // no braille, no sextants in linux console

View File

@ -175,8 +175,9 @@ typedef enum {
TERMINAL_KITTY, // XTGETTCAP['TN'] == 'xterm-kitty'
TERMINAL_FOOT, // TDA: "\EP!|464f4f54\E\\"
TERMINAL_MLTERM, // XTGETTCAP['TN'] == 'mlterm'
TERMINAL_WEZTERM,
TERMINAL_WEZTERM, // XTVERSION == 'WezTerm *'
TERMINAL_ALACRITTY, // can't be detected; match TERM
TERMINAL_CONTOUR, // XTVERSION == 'console *'
} queried_terminals_e;
#ifdef __cplusplus