-
Notifications
You must be signed in to change notification settings - Fork 689
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
Configuration to specify separate light/dark mode theme #2735
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: this doesn't have any syntax the user can use in a configuration yet. This just implements a core, tested system.
jparise
reviewed
Nov 20, 2024
@@ -209,7 +209,7 @@ fn canTrackDiags(comptime T: type) bool { | |||
/// This may result in allocations. The allocations can only be freed by freeing | |||
/// all the memory associated with alloc. It is expected that alloc points to | |||
/// an arena. | |||
fn parseIntoField( | |||
pub fn parseIntoField( |
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 don't think this needs to be public in the current revision.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2725
This introduces the following configuration style that will set the terminal theme depending on the current system theme. This works on both macOS and GTK builds.
This comes with some known limitations and bugs that are documented on
theme
. These can be fixed in the future, but they relate to specific configuration permutations and I don't think it's worth blocking this PR on it. I've mitigated some of the bugs by simply disabling some configurations when a light/dark mode theme is specified.The core of this is implemented using the building blocks for a more generic conditional configuration system as discussed in the original discussion #2356. There is still some work to make this robust for any configuration value but a lot of complex groundwork has been laid...
Demo
CleanShot.2024-11-19.at.16.20.21.mp4