-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: generate default config if not exists #249
base: main
Are you sure you want to change the base?
Conversation
Resolves #201 |
Hi, while this is a good pr I am not a fan of the inline file writing we are doing as everytime we introduce new features, the examples need to be put into this file. It's ideally the distributions responsibility during packaging to provide a sample config -- just how programs like sway and alacritty have theirs defaulted to by the distribution. @zubairmh What do you think? |
We could have a default config in codebase that copies itself to the config path upon the first extension startup, something like in the sway codebase here. This PR could easily be modified to do something like that. @Shinyzenith |
I think having a example config would be nice but the copying function is responsbility of the distribution as they like to patch configs before pushing to users. Having the file in the repo means we need to bake it into the binary to finally write to disk -- increasing binary size. |
@Shinyzenith any solutions for this? |
I think this pr would be better to just introduce a default config -- also lets discuss patches in the github issue before forming the pr -- I don't want any contributor to feel like their efforts are going to waste. This way we get to discuss about the project goals and if the pr is a good idea 😊 |
Hmm sure @Shinyzenith ill add the new issue |
Currently SWHKD leads to a config error if the file at the default config path is missing (/etc/swhkd/swhkdrc).
This PR adds a mechanism to generate a default config (populated with an example from man 5 swhkd), the generated config is commented out by default.