gitbutler
gitbutler copied to clipboard
Custom theming support
Right now, GitButler supports only two themes — dark and light. It would be nice to support custom themes, e.g. support more presets or allow making fully custom via config.
If we implement #2932 then this should be a pretty trivial shuttling of information between that and the frontend. @PavelLaptev what do you think about having a fourth "Appearance" selection (from the screenshot in the OP) that is shown if you have a [theme]
section in the config file?
We could have a base
field that indicates if the CSS var overrides are based on the dark/light theme, and then the rest of the fields would be CSS vars we whitelist, shuttle that down to the frontend via a function/event (we can fswatch it for changes, too). Then the frontend just calls whatever.style.setProperty(
--${varName}, varValue)
.
@Qix- yes, that's should work 🙂