diff --git a/src/main.rs b/src/main.rs index fd94bbf..9132343 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,7 @@ use std::ptr; use std::{io, time::Duration}; use configuration::{Configuration, APP_CONFIG}; +use gdk_pixbuf::gio::ApplicationFlags; use gdk_pixbuf::{Pixbuf, PixbufLoader}; use gtk::prelude::*; @@ -297,7 +298,13 @@ fn run_satty() -> Result<()> { }; // start GUI - let app = RelmApp::new("com.gabm.satty").with_args(vec![]); + let app = relm4::main_application(); + app.set_application_id(Some("com.gabm.satty")); + // set flag to allow to run multiple instances + app.set_flags(ApplicationFlags::NON_UNIQUE); + + // create relm app and run + let app = RelmApp::from_app(app).with_args(vec![]); relm4_icons::initialize_icons(); app.run::(image); Ok(())