2024-05-06 15:39:04 +02:00
|
|
|
// Copyright 2023 System76 <info@system76.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
|
|
2025-12-09 18:41:37 -08:00
|
|
|
use std::{env, process};
|
|
|
|
|
|
2024-03-14 18:47:41 +01:00
|
|
|
mod components;
|
|
|
|
|
mod subscriptions;
|
|
|
|
|
|
2025-12-09 18:41:37 -08:00
|
|
|
pub mod status_notifier_watcher;
|
|
|
|
|
mod unique_names;
|
|
|
|
|
|
2024-03-14 18:47:41 +01:00
|
|
|
pub fn run() -> cosmic::iced::Result {
|
2025-12-09 18:41:37 -08:00
|
|
|
if let Some(arg) = env::args().nth(1) {
|
|
|
|
|
if arg == "--status-notifier-watcher" {
|
|
|
|
|
status_notifier_watcher::run()
|
|
|
|
|
} else {
|
|
|
|
|
tracing::error!("Invalid argument `{arg}` for status-area applet`");
|
|
|
|
|
process::exit(1);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
components::app::main()
|
|
|
|
|
}
|
2024-03-14 18:47:41 +01:00
|
|
|
}
|