commit d6c431859c6c0201e0668ed24a9f17cebf0a68f5 from: Ayman Bagabas via: Hiltjo Posthuma date: Sat Aug 9 10:34:01 2025 UTC Support OSC 110, 111, and 112 for resetting colors This adds support for OSC 110, 111, and 112 escape sequences to reset the foreground, background, and cursor colors in the terminal. The changes include handling these sequences in the `strhandle` function of `st.c`, allowing applications to reset colors to their default values. The OSC sequences originated from Xterm control sequences and are now widely used in terminal applications and supported by many terminal emulators. For applications, this allows them to reset colors to default values without needing to know the colors beforehand. Signed-off-by: Ayman Bagabas commit - f114bcedd113017d907aad32031db92c050f4bf3 commit + d6c431859c6c0201e0668ed24a9f17cebf0a68f5 blob - 37f38c5464767da3c1bc5255c4cf451af02de10f blob + e9fea17d3cc239f71265ecf7598cce21b0a25c28 --- st.c +++ st.c @@ -1967,6 +1967,19 @@ strhandle(void) tfulldirt(); } return; + case 110: + case 111: + case 112: + if (narg != 1) + break; + if ((j = par - 110) < 0 || j >= LEN(osc_table)) + break; /* shouldn't be possible */ + if (xsetcolorname(osc_table[j].idx, NULL)) { + fprintf(stderr, "erresc: %s color not found\n", osc_table[j].str); + } else { + tfulldirt(); + } + return; } break; case 'k': /* old title set compatibility */