-
Notifications
You must be signed in to change notification settings - Fork 425
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
Add extra options to theme-preview.sh for config #805
Conversation
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.
Awesome, that's going to be useful.
I tested with several themes and presets and it works well, except for the minimal
theme, which ends on missing LP_PS1_PREFIX.
So the Likely it should not have been under It does leave the UX lacking though. You can load a template like this with an inline config file: ./tools/theme-preview.sh default --config-file <(echo LP_PS1_FILE=themes/minimal/minimal.ps1) But maybe we add an argument, |
I guess that would be the clearest option for a naive user, indeed. |
The original intent for theme-preview.sh was to have a reference for a static output of a theme. So all runs of the tool for a specific theme would always show the same output. But a different, completely valid use is to see how a theme would look with your config, or to see how changing your config might change how a theme looks. Add optional arguments that will allow for loading the user config, input files, or to return to the original functionality of locking the COLUMNS to a set value. There is still no way to control the mocked data, and there might still be some weird quirks with the imbedded config in the tool conflicting with user config. Fix the minimal theme using the wrong PS1 variable. Fix Zsh crash in unfold theme. Fixes #800
40b6050
to
54cbdcb
Compare
Add extra checks and warnings to script. Also add more docs and docs fixes. Also add examples for the script to the tests. Move minimal.ps1 to templates/ directory. Co-authored-by: nojhan <nojhan@nojhan.net>
54cbdcb
to
6fc4fb8
Compare
This is ready for review. The failed docs lint is because I moved the |
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.
Looks good, just two minor (and optional) questions.
Also clarify that config presets are a valid option.
The original intent for theme-preview.sh was to have a reference for a static output of a theme. So all runs of the tool for a specific theme would always show the same output.
But a different, completely valid use is to see how a theme would look with your config, or to see how changing your config might change how a theme looks.
Add optional arguments that will allow for loading the user config, input files, or to return to the original functionality of locking the
COLUMNS
to a set value.There is still no way to control the mocked data, and there might still be some weird quirks with the imbedded config in the tool conflicting with user config.
Fix the minimal theme using the wrong
PS1
variable.Fix Zsh crash in unfold theme.
Fixes #800