terminal/.github
Dustin L. Howett 3b4ee83ed1
Add support for querying Xterm dynamic colors and palette (#17729)
This pull request adds support for querying all of the "dynamic
resource" colors (foreground, background, cursor) as well as the entire
color palette using OSC 4, 10, 11 and 12 with the `?` color specifier.

To ease integration and to make it easier to extend later, I have
consolidated `SetDefaultForeground`, `SetDefaultBackground` and
`SetCursorColor` into one function `SetXtermColorResource`, plus its
analog `RequestXtermColorResource`.

Those functions will map xterm resource OSC numbers to color table
entries and optionally color _alias_ entries using a constant table. The
alias mappings are required to support reassigning the default
foreground and background to their indexed entries after a `DECAC`.

While there are only three real entries in the mapping table right now,
I have designs on bringing in selection background (xterm "highlight")
and foreground (xterm "highlightText").

We can also extend this to support resetting via OSC 110-119. However,
at the adapter layer we do not have the requisite information to restore
any of the colors (even the cursor color!) to the user's defaults.

`OSC 10` and `OSC 11` queries report the final values of
`DECAC`-reassigned entries, under the assumption that an application
asking for them wants to make a determination regardless of their
internal meaning to us (that is: they read through the aliased color to
its final destination in the color palette.)

I've tested this with lsix, which detects the background color before
generating sixel previews. It works great!

ConPTY does not currently pass OSC sequences received on the input
handle, so work was required to make it do so.

Closes #3718
2024-08-21 17:45:14 -05:00
..
ISSUE_TEMPLATE Update bug template to help find the version number accurately (#14375) 2022-11-14 22:00:11 +00:00
actions/spelling Add support for querying Xterm dynamic colors and palette (#17729) 2024-08-21 17:45:14 -05:00
linters Add support for autodetecting URLs and making hyperlinks (#7691) 2020-10-28 20:24:43 +00:00
policies Onboard to GitOps.ResourceManagement (#15557) 2023-07-06 17:03:01 -05:00
workflows Remove "SimilarIssues" Bot prototype (#17598) 2024-07-22 10:10:06 -07:00
PULL_REQUEST_TEMPLATE.md Make the PR template less unfriendly (#14697) 2023-01-19 11:39:04 +00:00