-
-
Notifications
You must be signed in to change notification settings - Fork 38
feat: implement config file (2) #154
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
|
Things look good to me. The documented toml file is a plus. We should also have a man page section dedicated to the config file. Either that, or we should install the example config in /etc and mention it in man page. |
|
@Decodetalkers can you take a look too? |
Also seems good for me, we can merge it |
|
Hey, @Shinyzenith! I have added the doc file for config (took alacritty's config man for reference), but the doc build fails, could you please look at it? I am not familiar with the format, so I don't really know what's wrong |
|
Sure, I'll take a look |
Signed-off-by: Shinyzenith <[email protected]>
Signed-off-by: Shinyzenith <[email protected]>
Supersedes #104, closes #97
Most of the stuff, discussed in #104 applied here. We still first take CLI arguments, then config values and only then some defaults to make decisions. Again, by default
config.tomldoes not exist and it's OK to have all options commented out/unset.Default behavior is mostly unchanged, minor non-breaking behavior changes listed below:
cli.log_levelnow is aOption<Level>with fallback valueLevel::Infoin config. No changes from user perspective whatsoevercli.configparameter. Defaults for fallback are also addedcursorandclipboardarefalse(default behavior) -> read values inconfig.toml(defaults for these values arefalseas well, so current users won't notice the difference)stdout,clipboardandFILEdoesn't conflict with each other anymore. Screenshot file will not appear on disk now only if noFILEprovided via args andfileinconfig.tomlisfalseat the same time. In all other cases file is saved, with path following this priority:FILE>config.file.path> current directory. Not breaking, but two category of users affected. First, users currently using-asFILEwill notice that aside fromstdout, there's a screenshot file in current directory (if no config edits were made). Second catogory is users, that did not provideFILEbut provided--clipboardargument: these users will see similar behavior as above