feat: enable limiting applications to a single instance

This commit is contained in:
Ashley Wulber 2023-10-26 10:26:32 -04:00
parent 7b2b8952c6
commit 9da2501f28
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
5 changed files with 178 additions and 2 deletions

View file

@ -62,6 +62,9 @@ pub struct Settings {
/// Whether the application should exit when there are no open windows
pub(crate) exit_on_close: bool,
/// Only allow a single instance of the application to run
pub single_instance: bool,
}
impl Settings {
@ -97,6 +100,7 @@ impl Default for Settings {
theme: crate::theme::system_preference(),
transparent: false,
exit_on_close: true,
single_instance: false,
}
}
}