Skip to content
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

GTK: ability to load custom CSS #4089

Closed
mitchellh opened this issue Dec 30, 2024 · 3 comments · Fixed by #4200
Closed

GTK: ability to load custom CSS #4089

mitchellh opened this issue Dec 30, 2024 · 3 comments · Fixed by #4200
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Milestone

Comments

@mitchellh
Copy link
Contributor

Discussed in #4088

Originally posted by jcollie December 30, 2024
Add a config entry gtk-custom-css that, when set, will load custom CSS from a file. The setting can be repeated to load multiple files and files can be marked as optional by prefixing it with a ?. The custom CSS will be added as priority USER so it should take precedence over any CSS set by Ghostty or the system

@mitchellh mitchellh added os/linux contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Dec 30, 2024
@gold
Copy link

gold commented Dec 30, 2024

Very nice idea, but certainly not the highest priority; the extremely sane defaults, simple config syntax (simplicity is a virtue), built-in theme browser, etc., already make the first public ghostty release super nice. (thank you Mitchell!)

"The setting can be repeated to load multiple files and files can be marked as optional by prefixing it with a ?."

Prefixing "it," meaning the filename referenced in the setting? e.g., gtk-custom-css = ?/full-path/my-style.css

And what is the behavior difference using ? prefix to mark config entry as optional vs. commenting out the line?

@mitchellh
Copy link
Contributor Author

Prefixing "it," meaning the filename referenced in the setting? e.g., gtk-custom-css = ?/full-path/my-style.css

And what is the behavior difference using ? prefix to mark config entry as optional vs. commenting out the line?

Yes, this behavior comes "for free" in a sense, it's already used by config-file. The behavior is fully documented for that if you want to take a look!

@jcollie
Copy link
Collaborator

jcollie commented Dec 30, 2024

And what is the behavior difference using ? prefix to mark config entry as optional vs. commenting out the line?

In this particular case, marking a file as optional means that Ghostty won't log a warning if the file doesn't exist. Basically it's a way to have custom configuration for different systems by adding/removing files rather than rewriting your config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants