-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Terminal Background Image Support #7686
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
Conversation
Turns out using compressed image formats is a trivial change (already happens automagically on Metal and it's just a few lines different on OpenGL), so I'll add that as a commit to this PR. |
Yes, but I want to do this in a slightly more thoughtful way. The core needs to be come generally layout aware to enable a number of features:
Probably more. So we should do this in a way that knocks all those out, I think.
Yes, we should do this similar to how we do our font grid. Future PR. |
Adds support for background images via the `background-image` config. Resolves ghostty-org#3645, supersedes PRs ghostty-org#4226 and ghostty-org#5233. See docs of added config keys for usage details.
BPTC is required to be available OpenGL >= 4.2 and our minimum is 4.3 so this is safe in terms of support. I tested briefly in a VM and didn't encounter any problems so this should just be a complete win. (Note: texture data is already automatically compressed on Metal)
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.
I rebased and I updated the background-image
docs to have a lot more details and note the VRAM issue.
Adds support for background images via the
background-image
config.Resolves #3645, supersedes PRs #4226 and #5233.
See docs of added config keys for usage details.
Note
Unlike what is implied by the original issue, because this is implemented in the renderer it is inherently per-surface not per-window, meaning a window with a split will have two copies of the background image.
Future work
background-image-area
config with options forsurface
andwindow
to control that behavior (and probably default it towindow
). That apprt code would also allow for window-relative custom shader locations, which is also a fairly common user request, so I think it's worth it.It's probably worth using compressed texture formats for images, I'll look in to doing that.(c43702c)