termenv icon indicating copy to clipboard operation
termenv copied to clipboard

Add support for GNU Screen

Open jwodder opened this issue 1 year ago • 0 comments

It appears that this library is currently unable to query GNU Screen and tmux terminals for their foreground & background colors, but I would like it to be able to do so. According to the source code for the termbg Rust library, a Screen terminal can be queried for its background color with the sequence "\x1bP\x1b]11;?\x07\x1b\\\x03"; I can confirm this works as of Screen 4.9.1, and I can also confirm that the foreground color can be queried by changing the 11 in the background query to a 10. In addition, the sequence that termenv uses for querying the cursor position ("\x1b[6n") also works with Screen.

termbg also uses the sequence "\x1bPtmux;\x1b\x1b]11;?\x07\x1b\\\x03" for getting the background color for tmux terminals. I don't have tmux, so I can't test it, but this sequence does work with my copy of Screen.

jwodder avatar Nov 07 '23 14:11 jwodder