-
Notifications
You must be signed in to change notification settings - Fork 48
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
[FEATURE] Read-only rendered files #51
Comments
So instead of having:
You'd like
I think it would be a better user experience in that case, but right now Dotter copies the permissions exactly as they are on the source file and I don't want to change it by default. Also, editing the target file is sometimes useful for quickly testing something or for GUI applications that actually edit it when you modify their settings. I'm open to implementing this as a flag though. |
Would it be possible to not change the permissions of the files, but add the ability to automatically merge changes before deploying? There could also be a merge command. Dotter can print an error if the file has templates. Even better, if the changes don't touch template code, then do the merge. I'm not sure how you would implement this, though. Although, I'm open to helping out after the semester ends. |
This is actually the only interesting case - in case of a symlink, the filesystem already keeps both locations in sync since they actually are the same file on disk, so nothing needs to be done. I'm not sure on how to implement this either :P |
Maybe one possibility is to pre-render template in temp/cache folder then diff the pre-render with the target? |
It seems like a good idea and a pretty simple solution to the problem - this will also help you decide if you want to Note to self: This could be done in this code - stick a Note2: Actually this is more complicated. The |
Is your feature request related to a problem? Please describe.
Sometimes I forget about dotter and edit files in place (e.g.
~/.config/sway/config
instead of~/.dotter/sway
) This causes issues when deploying dotfiles.Describe the solution you'd like
Make the rendered files read-only (like
chmod a-w
)Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: