feat: add option to set a custom lipgloss renderer #403
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lip Gloss defaults to
os.Stdout
to detect the background color and color profile of the terminal. This can be a problem when the application is using a different output stream likeos.Stderr
or a remote session like in an SSH server.When using an SSH server, usually the server provides to the session a
$SSH_TTY
environment variable pointing to the allocated PTY to be used for the application. The value of$SSH_TTY
points to the terminal TTYFD that should be used to run the application.
Starting with Lip Gloss v0.7, you can use custom renderers to specify a different Lip Gloss output to detect the background color and color profile. This PR adds the necessary "glue" to the Bubbles in order to change the renderer being used to detect the color profile and background.