-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add option to set a custom lipgloss renderer #403
Conversation
// depending on the focus state. | ||
// | ||
// For an introduction to styling with Lip Gloss see: | ||
// https://github.com/charmbracelet/lipgloss | ||
type Style struct { | ||
type Styles struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason for the change here other than aesthetics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency with other bubbles. The type alias should take care of backward compatibility.
7b958c0
to
fed025b
Compare
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 like `os.Stderr` or a remote session like in a 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 TTY FD 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.
fed025b
to
7bdf3e0
Compare
@aymanbagabas I think we can close this one? |
Let's keep it open for now until we come to a conclusion with the v2 changes |
looks like yes @aymanbagabas , this is gonna be fixed by bubbletea v2, right? |
Right, with the current v2, we'd still need to pass the |
yeah, so imo lets close this |
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.