Skip to content

Commit

Permalink
tdescs: ghostty always has quadrants and sextants #2833
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jan 30, 2025
1 parent 82ead0e commit 8c02c30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/termdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ apply_kitty_heuristics(tinfo* ti, size_t* tablelen, size_t* tableused){
if(add_smulx_escapes(ti, tablelen, tableused)){
return NULL;
}
// FIXME we have problems using SELFREF; fix them!
/*if(compare_versions(ti->termversion, "0.22.1") >= 0){
setup_kitty_bitmaps(ti, ti->ttyfd, NCPIXEL_KITTY_SELFREF);
}else*/ if(compare_versions(ti->termversion, "0.20.0") >= 0){
Expand Down Expand Up @@ -925,6 +926,13 @@ apply_konsole_heuristics(tinfo* ti){
return "Konsole";
}

static const char*
apply_ghostty_heuristics(tinfo* ti){
ti->caps.quadrants = true;
ti->caps.sextants = true;
return "ghostty";
}

static const char*
apply_linux_heuristics(tinfo* ti, unsigned nonewfonts){
const char* tname = NULL;
Expand Down Expand Up @@ -975,6 +983,7 @@ apply_term_heuristics(tinfo* ti, const char* tname, queried_terminals_e qterm,
// setupterm interprets a missing/empty TERM variable as the special value “unknown”.
tname = ti->termname ? ti->termname : "unknown";
}
loginfo("tname is %s (qterm %d)", tname, qterm);
// st had neither caps.sextants nor caps.quadrants last i checked (0.8.4)
ti->caps.braille = true; // most everyone has working caps.braille, even from fonts
ti->caps.halfblocks = true; // most everyone has working halfblocks
Expand Down Expand Up @@ -1039,7 +1048,11 @@ apply_term_heuristics(tinfo* ti, const char* tname, queried_terminals_e qterm,
case TERMINAL_KONSOLE:
newname = apply_konsole_heuristics(ti);
break;
case TERMINAL_GHOSTTY:
newname = apply_ghostty_heuristics(ti);
break;
default:
logwarn("no match for qterm %d tname %s", qterm, tname);
newname = tname;
break;
}
Expand Down

0 comments on commit 8c02c30

Please sign in to comment.