X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=85b0b5901f8d3d6b2fe8b96cce81f1d27cf75949;hb=ffeeb678c5c6c6b895ad494b5b62195dd9893f65;hp=16c64b1cbbdfebb91660f9f838a8ee345c47a794;hpb=b16b5d77d31c4c6b2577ab0986e85b43baaf834a;p=st.git diff --git a/st.c b/st.c index 16c64b1..85b0b59 100644 --- a/st.c +++ b/st.c @@ -72,6 +72,8 @@ #define X2COL(x) (((x) - BORDER)/xw.cw) #define Y2ROW(y) (((y) - BORDER)/xw.ch) +#define VT102ID "\033[?6c" + enum glyph_attribute { ATTR_NULL = 0, ATTR_REVERSE = 1, @@ -1510,6 +1512,10 @@ csihandle(void) { DEFAULT(csiescseq.arg[0], 1); tmoveto(term.c.x, term.c.y+csiescseq.arg[0]); break; + case 'c': /* DA -- Device Attributes */ + if(csiescseq.arg[0] == 0) + ttywrite(VT102ID, sizeof(VT102ID)); + break; case 'C': /* CUF -- Cursor Forward */ case 'a': DEFAULT(csiescseq.arg[0], 1); @@ -1933,6 +1939,9 @@ tputc(char *c, int len) { } term.esc = 0; break; + case 'Z': /* DECID -- Identify Terminal */ + ttywrite(VT102ID, sizeof(VT102ID)); + break; case 'c': /* RIS -- Reset to inital state */ treset(); term.esc = 0; @@ -2310,7 +2319,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { * Those ranges will not be brightened: * 8 - 15 – bright system colors * 196 - 231 – highest 256 color cube - * 252 - 255 – brightest colors in grescale + * 252 - 255 – brightest colors in greyscale */ font = &dc.bfont; }