Skip to content
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

Respect user autostart options #89

Merged
merged 8 commits into from
Aug 21, 2023
Merged

Conversation

leolost2605
Copy link
Member

Currently disabling autostart for an app like mail via startup settings gets reverted every time the app is launched again because the app then asks for autostart permission again and the autostart file is entirely overwritten. To disable it one would have to revoke the flatpak permission which currently can't be done graphically without third party tools. Also this wouldn't work for non flatpak applications.
With this PR we check whether an autostart file already exists and if so we check whether it has the hidden key and add it to the new autostart file. We still overwrite it completely to avoid keeping other keys we might not want (I'm not 100% sure whether that's really necessary but it seems the most save way)

@leolost2605 leolost2605 requested a review from a team August 6, 2023 12:04
@Marukesu
Copy link
Contributor

It would be simpler to load the contents directly in the key_file when it already exists. There's no need to worry about keeping others keys.

@danirabbit danirabbit mentioned this pull request Aug 18, 2023
@leolost2605
Copy link
Member Author

@Marukesu done.

@zeebok zeebok merged commit 5642383 into main Aug 21, 2023
4 checks passed
@zeebok zeebok deleted the background-respect-user-autostart branch August 21, 2023 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants