-
Notifications
You must be signed in to change notification settings - Fork 43
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(config): add auto saving on app exit #168
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.
Don't forget to update the man page too.
@@ -246,7 +246,7 @@ static void save_state_to_file_or_folder(struct swappy_state *state, | |||
} | |||
|
|||
static void maybe_save_output_file(struct swappy_state *state) { | |||
if (state->output_file != NULL) { | |||
if (state->config->auto_save) { |
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.
if (state->config->auto_save) { | |
if (state->config->auto_save && state->output_file != NULL) { |
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.
I dont think we need to check NULL for state->output_file here, as in case output_file=NULL, in save_state_to_file_or_folder
the file name is generated.
Actually, with the NULL check, at least in my case, the file is not auto saved.
I'm using swappy in sway
using the command as specified in the README:
grim -g "$(slurp)" - | swappy -f -
every time I make a screenshot, then I close the swappy, the filename is NULL so the picture is not saved.
No description provided.