refactor: compile applets as multicall binary
This commit is contained in:
parent
4099624499
commit
3c4acdacd7
48 changed files with 2393 additions and 2256 deletions
22
cosmic-applets/Cargo.toml
Normal file
22
cosmic-applets/Cargo.toml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[package]
|
||||
name = "cosmic-applets"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
cosmic-app-list = { path = "../cosmic-app-list" }
|
||||
cosmic-applet-audio = { path = "../cosmic-applet-audio" }
|
||||
cosmic-applet-battery = { path = "../cosmic-applet-battery" }
|
||||
cosmic-applet-bluetooth = { path = "../cosmic-applet-bluetooth" }
|
||||
cosmic-applet-minimize = { path = "../cosmic-applet-minimize" }
|
||||
cosmic-applet-network = { path = "../cosmic-applet-network" }
|
||||
cosmic-applet-notifications = { path = "../cosmic-applet-notifications" }
|
||||
cosmic-applet-power = { path = "../cosmic-applet-power" }
|
||||
cosmic-applet-status-area = { path = "../cosmic-applet-status-area" }
|
||||
cosmic-applet-tiling = { path = "../cosmic-applet-tiling" }
|
||||
cosmic-applet-time = { path = "../cosmic-applet-time" }
|
||||
cosmic-applet-workspaces = { path = "../cosmic-applet-workspaces" }
|
||||
libcosmic.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
tracing-log.workspace = true
|
||||
31
cosmic-applets/src/main.rs
Normal file
31
cosmic-applets/src/main.rs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
fn main() -> cosmic::iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
let _ = tracing_log::LogTracer::init();
|
||||
|
||||
let Some(applet) = std::env::args().next() else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let start = applet.rfind('/').map(|v| v + 1).unwrap_or(0);
|
||||
let cmd = &applet.as_str()[start..];
|
||||
|
||||
tracing::info!("Starting `{cmd}` with version {VERSION}");
|
||||
|
||||
match cmd {
|
||||
"cosmic-app-list" => cosmic_app_list::run(),
|
||||
"cosmic-applet-audio" => cosmic_applet_audio::run(),
|
||||
"cosmic-applet-battery" => cosmic_applet_battery::run(),
|
||||
"cosmic-applet-bluetooth" => cosmic_applet_bluetooth::run(),
|
||||
"cosmic-applet-minimize" => cosmic_applet_minimize::run(),
|
||||
"cosmic-applet-network" => cosmic_applet_network::run(),
|
||||
"cosmic-applet-notifications" => cosmic_applet_notifications::run(),
|
||||
"cosmic-applet-power" => cosmic_applet_power::run(),
|
||||
"cosmic-applet-status-area" => cosmic_applet_status_area::run(),
|
||||
"cosmic-applet-tiling" => cosmic_applet_tiling::run(),
|
||||
"cosmic-applet-time" => cosmic_applet_time::run(),
|
||||
"cosmic-applet-workspaces" => cosmic_applet_workspaces::run(),
|
||||
_ => return Ok(()),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue