refactor: compile applets as multicall binary
This commit is contained in:
parent
4099624499
commit
3c4acdacd7
48 changed files with 2393 additions and 2256 deletions
|
|
@ -12,6 +12,8 @@ chrono = { version = "0.4.34", features = ["clock"] }
|
|||
once_cell = "1"
|
||||
tokio = { version = "1.36.0", features = ["time"] }
|
||||
tracing.workspace = true
|
||||
tracing-log.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
|
||||
# Application i18n
|
||||
i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-requester"] }
|
||||
|
|
|
|||
11
cosmic-applet-time/src/lib.rs
Normal file
11
cosmic-applet-time/src/lib.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
mod localize;
|
||||
mod time;
|
||||
mod window;
|
||||
|
||||
use window::Window;
|
||||
|
||||
pub fn run() -> cosmic::iced::Result {
|
||||
localize::localize();
|
||||
|
||||
cosmic::applet::run::<Window>(true, ())
|
||||
}
|
||||
|
|
@ -1,11 +1,10 @@
|
|||
mod localize;
|
||||
mod time;
|
||||
mod window;
|
||||
|
||||
use window::Window;
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
fn main() -> cosmic::iced::Result {
|
||||
localize::localize();
|
||||
tracing_subscriber::fmt::init();
|
||||
let _ = tracing_log::LogTracer::init();
|
||||
|
||||
cosmic::applet::run::<Window>(true, ())
|
||||
tracing::info!("Starting time applet with version {VERSION}");
|
||||
|
||||
cosmic_applet_time::run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use cosmic::{
|
|||
};
|
||||
|
||||
use chrono::{DateTime, Datelike, DurationRound, Local, Months, NaiveDate, Timelike, Weekday};
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::fl;
|
||||
use crate::time::get_calender_first;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue