From 8527257ddd5b04f32fc6f0d03bfb0df49d5f4d69 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Mon, 6 May 2024 15:39:04 +0200 Subject: [PATCH] chore: add SPDX license identifiers --- cosmic-app-list/Cargo.toml | 1 + cosmic-app-list/src/app.rs | 3 +++ cosmic-app-list/src/config.rs | 3 +++ cosmic-app-list/src/lib.rs | 4 +++- cosmic-app-list/src/localize.rs | 3 ++- cosmic-app-list/src/main.rs | 3 +++ cosmic-app-list/src/utils.rs | 3 ++- cosmic-app-list/src/wayland_handler.rs | 3 +++ cosmic-applet-audio/Cargo.toml | 3 +-- cosmic-applet-audio/src/config.rs | 3 +++ cosmic-applet-audio/src/lib.rs | 3 +++ cosmic-applet-audio/src/localize.rs | 3 ++- cosmic-applet-audio/src/main.rs | 3 +++ cosmic-applet-audio/src/mpris_subscription.rs | 3 +++ cosmic-applet-audio/src/pulse.rs | 3 +++ cosmic-applet-battery/Cargo.toml | 1 + cosmic-applet-battery/src/app.rs | 3 +++ cosmic-applet-battery/src/backend/mod.rs | 3 +++ cosmic-applet-battery/src/backlight.rs | 3 +++ cosmic-applet-battery/src/config.rs | 3 +++ cosmic-applet-battery/src/dgpu.rs | 3 +++ cosmic-applet-battery/src/lib.rs | 3 +++ cosmic-applet-battery/src/localize.rs | 3 ++- cosmic-applet-battery/src/main.rs | 3 +++ cosmic-applet-bluetooth/Cargo.toml | 2 +- cosmic-applet-bluetooth/src/app.rs | 3 +++ cosmic-applet-bluetooth/src/bluetooth.rs | 3 +++ cosmic-applet-bluetooth/src/config.rs | 3 +++ cosmic-applet-bluetooth/src/lib.rs | 3 ++- cosmic-applet-bluetooth/src/localize.rs | 3 ++- cosmic-applet-bluetooth/src/main.rs | 3 +++ cosmic-applet-input-sources/Cargo.toml | 1 + cosmic-applet-input-sources/src/config.rs | 6 ++++++ cosmic-applet-input-sources/src/lib.rs | 12 +++++++---- cosmic-applet-input-sources/src/localize.rs | 11 +++++++++- cosmic-applet-input-sources/src/main.rs | 3 +++ cosmic-applet-input-sources/src/window.rs | 20 ++++++++++++++----- cosmic-applet-minimize/Cargo.toml | 3 +-- cosmic-applet-minimize/src/lib.rs | 3 +++ cosmic-applet-minimize/src/localize.rs | 3 ++- cosmic-applet-minimize/src/main.rs | 3 +++ cosmic-applet-minimize/src/wayland_handler.rs | 3 +++ .../src/wayland_subscription.rs | 3 +++ cosmic-applet-minimize/src/window_image.rs | 3 +++ cosmic-applet-notifications/Cargo.toml | 2 +- cosmic-applet-notifications/src/lib.rs | 5 ++++- cosmic-applet-notifications/src/localize.rs | 3 ++- cosmic-applet-notifications/src/main.rs | 3 +++ .../src/subscriptions/dbus.rs | 3 +++ .../src/subscriptions/mod.rs | 3 +++ .../src/subscriptions/notifications.rs | 3 +++ cosmic-applet-power/Cargo.toml | 2 +- cosmic-applet-power/src/cosmic_session.rs | 4 +++- cosmic-applet-power/src/lib.rs | 3 +++ cosmic-applet-power/src/localize.rs | 3 ++- cosmic-applet-power/src/main.rs | 3 +++ cosmic-applet-power/src/session_manager.rs | 3 ++- cosmic-applet-status-area/Cargo.toml | 2 +- .../src/components/app.rs | 3 +++ .../src/components/mod.rs | 3 +++ .../src/components/status_menu.rs | 3 +++ cosmic-applet-status-area/src/lib.rs | 3 +++ cosmic-applet-status-area/src/main.rs | 3 +++ .../src/subscriptions/mod.rs | 3 +++ .../src/subscriptions/status_notifier_item.rs | 3 +++ .../status_notifier_watcher/client.rs | 3 +++ .../status_notifier_watcher/mod.rs | 3 +++ .../status_notifier_watcher/server.rs | 3 +++ cosmic-applet-tiling/Cargo.toml | 4 +--- cosmic-applet-tiling/src/lib.rs | 3 +++ cosmic-applet-tiling/src/localize.rs | 3 ++- cosmic-applet-tiling/src/main.rs | 3 +++ cosmic-applet-tiling/src/wayland.rs | 3 +++ .../src/wayland_subscription.rs | 3 +++ cosmic-applet-tiling/src/window.rs | 3 +++ cosmic-applet-time/Cargo.toml | 2 +- cosmic-applet-time/src/config.rs | 3 +++ cosmic-applet-time/src/lib.rs | 3 +++ cosmic-applet-time/src/localize.rs | 3 ++- cosmic-applet-time/src/main.rs | 3 +++ cosmic-applet-time/src/time.rs | 3 +++ cosmic-applet-time/src/window.rs | 3 +++ cosmic-applet-workspaces/Cargo.toml | 1 + cosmic-applet-workspaces/src/colors.rs | 3 +++ .../src/components/app.rs | 3 +++ .../src/components/mod.rs | 3 +++ cosmic-applet-workspaces/src/config.rs | 3 +++ cosmic-applet-workspaces/src/lib.rs | 3 +++ cosmic-applet-workspaces/src/localize.rs | 3 ++- cosmic-applet-workspaces/src/main.rs | 3 +++ cosmic-applet-workspaces/src/wayland.rs | 3 +++ .../src/wayland_subscription.rs | 3 +++ cosmic-applets/Cargo.toml | 1 + cosmic-applets/src/main.rs | 3 +++ cosmic-panel-button/Cargo.toml | 2 +- cosmic-panel-button/src/main.rs | 3 +++ 96 files changed, 275 insertions(+), 39 deletions(-) diff --git a/cosmic-app-list/Cargo.toml b/cosmic-app-list/Cargo.toml index 4234d2b1..a572f1a4 100644 --- a/cosmic-app-list/Cargo.toml +++ b/cosmic-app-list/Cargo.toml @@ -2,6 +2,7 @@ name = "cosmic-app-list" version = "0.1.0" edition = "2021" +license = "GPL-3.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index cdfa622a..49a4abe9 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::config; use crate::config::AppListConfig; use crate::config::APP_ID; diff --git a/cosmic-app-list/src/config.rs b/cosmic-app-list/src/config.rs index 5b34acc7..9f2c15e7 100644 --- a/cosmic-app-list/src/config.rs +++ b/cosmic-app-list/src/config.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry; use cosmic::cosmic_config::{self, Config, CosmicConfigEntry}; use serde::{Deserialize, Serialize}; diff --git a/cosmic-app-list/src/lib.rs b/cosmic-app-list/src/lib.rs index 3bd675f5..cc398e5f 100644 --- a/cosmic-app-list/src/lib.rs +++ b/cosmic-app-list/src/lib.rs @@ -1,4 +1,6 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod app; mod config; mod localize; diff --git a/cosmic-app-list/src/localize.rs b/cosmic-app-list/src/localize.rs index 2606aecd..bf9f05fe 100644 --- a/cosmic-app-list/src/localize.rs +++ b/cosmic-app-list/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-app-list/src/main.rs b/cosmic-app-list/src/main.rs index f6e881f5..d06ff7b0 100644 --- a/cosmic-app-list/src/main.rs +++ b/cosmic-app-list/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-app-list/src/utils.rs b/cosmic-app-list/src/utils.rs index 7a6268c8..61c3e238 100644 --- a/cosmic-app-list/src/utils.rs +++ b/cosmic-app-list/src/utils.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use std::path::PathBuf; diff --git a/cosmic-app-list/src/wayland_handler.rs b/cosmic-app-list/src/wayland_handler.rs index b34edb3d..742e6197 100644 --- a/cosmic-app-list/src/wayland_handler.rs +++ b/cosmic-app-list/src/wayland_handler.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::wayland_subscription::{ OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, }; diff --git a/cosmic-applet-audio/Cargo.toml b/cosmic-applet-audio/Cargo.toml index dc190234..041e0db5 100644 --- a/cosmic-applet-audio/Cargo.toml +++ b/cosmic-applet-audio/Cargo.toml @@ -2,8 +2,7 @@ name = "cosmic-applet-audio" version = "0.1.1" edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +license = "GPL-3.0" [dependencies] cosmic-time.workspace = true diff --git a/cosmic-applet-audio/src/config.rs b/cosmic-applet-audio/src/config.rs index 10beb0e6..abfd8a3e 100644 --- a/cosmic-applet-audio/src/config.rs +++ b/cosmic-applet-audio/src/config.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry; use cosmic::cosmic_config::{self, CosmicConfigEntry}; use serde::{Deserialize, Serialize}; diff --git a/cosmic-applet-audio/src/lib.rs b/cosmic-applet-audio/src/lib.rs index 750c671c..20396f93 100644 --- a/cosmic-applet-audio/src/lib.rs +++ b/cosmic-applet-audio/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod localize; use crate::localize::localize; diff --git a/cosmic-applet-audio/src/localize.rs b/cosmic-applet-audio/src/localize.rs index 8f87ca3e..fea2f3ec 100644 --- a/cosmic-applet-audio/src/localize.rs +++ b/cosmic-applet-audio/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use cosmic_time::once_cell::sync::Lazy; use i18n_embed::{ diff --git a/cosmic-applet-audio/src/main.rs b/cosmic-applet-audio/src/main.rs index ad39d59a..7fd2016b 100644 --- a/cosmic-applet-audio/src/main.rs +++ b/cosmic-applet-audio/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); pub fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-audio/src/mpris_subscription.rs b/cosmic-applet-audio/src/mpris_subscription.rs index 05ca47ad..48d2c1ca 100644 --- a/cosmic-applet-audio/src/mpris_subscription.rs +++ b/cosmic-applet-audio/src/mpris_subscription.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::{borrow::Cow, fmt::Debug, hash::Hash, path::PathBuf}; use cosmic::{ diff --git a/cosmic-applet-audio/src/pulse.rs b/cosmic-applet-audio/src/pulse.rs index 41964d09..c3c254c2 100644 --- a/cosmic-applet-audio/src/pulse.rs +++ b/cosmic-applet-audio/src/pulse.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::cell::RefCell; use std::{rc::Rc, thread}; diff --git a/cosmic-applet-battery/Cargo.toml b/cosmic-applet-battery/Cargo.toml index 8873fed1..56d04d52 100644 --- a/cosmic-applet-battery/Cargo.toml +++ b/cosmic-applet-battery/Cargo.toml @@ -2,6 +2,7 @@ name = "cosmic-applet-battery" version = "0.1.0" edition = "2021" +license = "GPL-3.0" [dependencies] cosmic-time.workspace = true diff --git a/cosmic-applet-battery/src/app.rs b/cosmic-applet-battery/src/app.rs index d0300e62..69b97eef 100644 --- a/cosmic-applet-battery/src/app.rs +++ b/cosmic-applet-battery/src/app.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::backend::{power_profile_subscription, Power, PowerProfileRequest, PowerProfileUpdate}; use crate::backlight::{ screen_backlight_subscription, ScreenBacklightRequest, ScreenBacklightUpdate, diff --git a/cosmic-applet-battery/src/backend/mod.rs b/cosmic-applet-battery/src/backend/mod.rs index 80b6da5d..1ca38ae4 100644 --- a/cosmic-applet-battery/src/backend/mod.rs +++ b/cosmic-applet-battery/src/backend/mod.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::iced::{self, futures::SinkExt, subscription}; use std::fmt::Debug; use std::hash::Hash; diff --git a/cosmic-applet-battery/src/backlight.rs b/cosmic-applet-battery/src/backlight.rs index 861a267f..1c0ba113 100644 --- a/cosmic-applet-battery/src/backlight.rs +++ b/cosmic-applet-battery/src/backlight.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + // TODO: use udev to monitor for brightness changes? // How should key bindings be handled? Need something like gnome-settings-daemon? diff --git a/cosmic-applet-battery/src/config.rs b/cosmic-applet-battery/src/config.rs index e6abe89d..737ffc7a 100644 --- a/cosmic-applet-battery/src/config.rs +++ b/cosmic-applet-battery/src/config.rs @@ -1 +1,4 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub const APP_ID: &str = "com.system76.CosmicAppletButton"; diff --git a/cosmic-applet-battery/src/dgpu.rs b/cosmic-applet-battery/src/dgpu.rs index ea2829e6..11b6bb50 100644 --- a/cosmic-applet-battery/src/dgpu.rs +++ b/cosmic-applet-battery/src/dgpu.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::{ ffi::{OsStr, OsString}, fmt::{self, Debug}, diff --git a/cosmic-applet-battery/src/lib.rs b/cosmic-applet-battery/src/lib.rs index 9b1dd664..9560698e 100644 --- a/cosmic-applet-battery/src/lib.rs +++ b/cosmic-applet-battery/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + #[rustfmt::skip] mod backlight; mod app; diff --git a/cosmic-applet-battery/src/localize.rs b/cosmic-applet-battery/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-battery/src/localize.rs +++ b/cosmic-applet-battery/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-battery/src/main.rs b/cosmic-applet-battery/src/main.rs index 7a9119f1..d659d1cb 100644 --- a/cosmic-applet-battery/src/main.rs +++ b/cosmic-applet-battery/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-bluetooth/Cargo.toml b/cosmic-applet-bluetooth/Cargo.toml index dbf95a79..230ff424 100644 --- a/cosmic-applet-bluetooth/Cargo.toml +++ b/cosmic-applet-bluetooth/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-applet-bluetooth" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] anyhow.workspace = true diff --git a/cosmic-applet-bluetooth/src/app.rs b/cosmic-applet-bluetooth/src/app.rs index df7490a1..e1afa5f5 100644 --- a/cosmic-applet-bluetooth/src/app.rs +++ b/cosmic-applet-bluetooth/src/app.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::bluetooth::{BluerDeviceStatus, BluerRequest, BluerState}; use cosmic::applet::token::subscription::{ activation_token_subscription, TokenRequest, TokenUpdate, diff --git a/cosmic-applet-bluetooth/src/bluetooth.rs b/cosmic-applet-bluetooth/src/bluetooth.rs index 1cadca8d..0a6e0a31 100644 --- a/cosmic-applet-bluetooth/src/bluetooth.rs +++ b/cosmic-applet-bluetooth/src/bluetooth.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::{collections::HashMap, fmt::Debug, hash::Hash, mem, sync::Arc, time::Duration}; use bluer::{ diff --git a/cosmic-applet-bluetooth/src/config.rs b/cosmic-applet-bluetooth/src/config.rs index 10f6bdb0..ae10c01f 100644 --- a/cosmic-applet-bluetooth/src/config.rs +++ b/cosmic-applet-bluetooth/src/config.rs @@ -1 +1,4 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub const APP_ID: &str = "com.system76.CosmicAppletBluetooth"; diff --git a/cosmic-applet-bluetooth/src/lib.rs b/cosmic-applet-bluetooth/src/lib.rs index e3f39eda..6a614230 100644 --- a/cosmic-applet-bluetooth/src/lib.rs +++ b/cosmic-applet-bluetooth/src/lib.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only mod app; mod bluetooth; diff --git a/cosmic-applet-bluetooth/src/localize.rs b/cosmic-applet-bluetooth/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-bluetooth/src/localize.rs +++ b/cosmic-applet-bluetooth/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-bluetooth/src/main.rs b/cosmic-applet-bluetooth/src/main.rs index 3fd6fed1..3d024933 100644 --- a/cosmic-applet-bluetooth/src/main.rs +++ b/cosmic-applet-bluetooth/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-input-sources/Cargo.toml b/cosmic-applet-input-sources/Cargo.toml index 6dd90553..15b770e5 100644 --- a/cosmic-applet-input-sources/Cargo.toml +++ b/cosmic-applet-input-sources/Cargo.toml @@ -2,6 +2,7 @@ name = "cosmic-applet-input-sources" version = "0.1.0" edition = "2021" +license = "GPL-3.0" [dependencies] cosmic-time.workspace = true diff --git a/cosmic-applet-input-sources/src/config.rs b/cosmic-applet-input-sources/src/config.rs index c2a9b1f1..a2516f27 100644 --- a/cosmic-applet-input-sources/src/config.rs +++ b/cosmic-applet-input-sources/src/config.rs @@ -1,7 +1,12 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry}; use cosmic_comp_config::XkbConfig; use serde::{Deserialize, Serialize}; + pub const CONFIG_VERSION: u64 = 1; + #[derive(Clone, CosmicConfigEntry, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct Config {} impl Default for Config { @@ -9,6 +14,7 @@ impl Default for Config { Self {} } } + #[derive(Clone, CosmicConfigEntry, Debug, Deserialize, PartialEq, Serialize, Default)] pub struct CosmicCompConfig { pub xkb_config: XkbConfig, diff --git a/cosmic-applet-input-sources/src/lib.rs b/cosmic-applet-input-sources/src/lib.rs index ca0f5509..7c695b69 100644 --- a/cosmic-applet-input-sources/src/lib.rs +++ b/cosmic-applet-input-sources/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::window::Window; use config::{Config, CONFIG_VERSION}; use cosmic::cosmic_config; @@ -23,31 +26,32 @@ pub fn run() -> cosmic::iced::Result { let config = match Config::get_entry(&config_handler) { Ok(ok) => ok, Err((errs, config)) => { - eprintln!("errors loading config: {:?}", errs); + tracing::error!("errors loading config: {:?}", errs); config } }; (Some(config_handler), config) } Err(err) => { - eprintln!("failed to create config handler: {}", err); + tracing::error!("failed to create config handler: {}", err); (None, Config::default()) } }; + let (comp_config_handler, comp_config) = match cosmic_config::Config::new("com.system76.CosmicComp", CosmicCompConfig::VERSION) { Ok(config_handler) => { let config = match CosmicCompConfig::get_entry(&config_handler) { Ok(ok) => ok, Err((errs, config)) => { - eprintln!("errors loading config: {:?}", errs); + tracing::error!("errors loading config: {:?}", errs); config } }; (Some(config_handler), config) } Err(err) => { - eprintln!("failed to create config handler: {}", err); + tracing::error!("failed to create config handler: {}", err); (None, CosmicCompConfig::default()) } }; diff --git a/cosmic-applet-input-sources/src/localize.rs b/cosmic-applet-input-sources/src/localize.rs index 8ff0c87b..7fef8d61 100644 --- a/cosmic-applet-input-sources/src/localize.rs +++ b/cosmic-applet-input-sources/src/localize.rs @@ -1,12 +1,18 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, DefaultLocalizer, LanguageLoader, Localizer, }; + use once_cell::sync::Lazy; use rust_embed::RustEmbed; + #[derive(RustEmbed)] #[folder = "i18n/"] struct Localizations; + pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { let loader: FluentLanguageLoader = fluent_language_loader!(); loader @@ -14,6 +20,7 @@ pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { .expect("Error while loading fallback language"); loader }); + #[macro_export] macro_rules! fl { ($message_id:literal) => {{ @@ -23,14 +30,16 @@ macro_rules! fl { i18n_embed_fl::fl!($crate::localize::LANGUAGE_LOADER, $message_id, $($args), *) }}; } + // Get the `Localizer` to be used for localizing this library. pub fn localizer() -> Box { Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations)) } + pub fn localize() { let localizer = localizer(); let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages(); if let Err(error) = localizer.select(&requested_languages) { - eprintln!("Error while loading language for App List {}", error); + tracing::error!("Error while loading language for App List {}", error); } } diff --git a/cosmic-applet-input-sources/src/main.rs b/cosmic-applet-input-sources/src/main.rs index 24197a9e..1a13fe41 100644 --- a/cosmic-applet-input-sources/src/main.rs +++ b/cosmic-applet-input-sources/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + fn main() -> cosmic::iced::Result { tracing_subscriber::fmt::init(); let _ = tracing_log::LogTracer::init(); diff --git a/cosmic-applet-input-sources/src/window.rs b/cosmic-applet-input-sources/src/window.rs index 027c1565..ce8bad7b 100644 --- a/cosmic-applet-input-sources/src/window.rs +++ b/cosmic-applet-input-sources/src/window.rs @@ -1,3 +1,6 @@ +// Copyright 2024 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::config::{Config, CONFIG_VERSION}; #[allow(unused_imports)] use crate::fl; @@ -16,6 +19,7 @@ use cosmic::prelude::*; use cosmic::widget; use cosmic_comp_config::CosmicCompConfig; use xkb_data::KeyboardLayouts; + pub const ID: &str = "com.system76.CosmicAppletInputSources"; pub struct Window { @@ -29,6 +33,7 @@ pub struct Window { layouts: KeyboardLayouts, active_layouts: Vec, } + #[derive(Clone, Debug)] pub enum Message { Config(Config), @@ -38,6 +43,7 @@ pub enum Message { SetActiveLayout(ActiveLayout), KeyboardSettings, } + #[derive(Debug)] pub struct Flags { pub config_handler: Option, @@ -46,6 +52,7 @@ pub struct Flags { pub comp_config_handler: Option, pub layouts: KeyboardLayouts, } + impl cosmic::Application for Window { type Executor = cosmic::SingleThreadExecutor; type Flags = Flags; @@ -145,7 +152,7 @@ impl cosmic::Application for Window { if let Err(err) = comp_config_handler.set("xkb_config", &self.comp_config.xkb_config) { - eprint!("Failed to set config 'xkb_config' {err}"); + tracing::error!("Failed to set config 'xkb_config' {err}"); } } } @@ -204,9 +211,10 @@ impl cosmic::Application for Window { ) .map(|update| { if !update.errors.is_empty() { - eprintln!( + tracing::error!( "errors loading config {:?}: {:?}", - update.keys, update.errors + update.keys, + update.errors ); } Message::Config(update.config) @@ -216,9 +224,10 @@ impl cosmic::Application for Window { .watch_config("com.system76.CosmicComp") .map(|update| { if !update.errors.is_empty() { - eprintln!( + tracing::error!( "errors loading config {:?}: {:?}", - update.keys, update.errors + update.keys, + update.errors ); } Message::CompConfig(update.config) @@ -278,6 +287,7 @@ impl Window { active_layouts } } + #[derive(Debug, Clone, Eq, PartialEq)] pub struct ActiveLayout { layout: String, diff --git a/cosmic-applet-minimize/Cargo.toml b/cosmic-applet-minimize/Cargo.toml index c25dbb3d..e1c0791d 100644 --- a/cosmic-applet-minimize/Cargo.toml +++ b/cosmic-applet-minimize/Cargo.toml @@ -2,8 +2,7 @@ name = "cosmic-applet-minimize" version = "0.1.1" edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +license = "GPL-3.0" [dependencies] anyhow.workspace = true diff --git a/cosmic-applet-minimize/src/lib.rs b/cosmic-applet-minimize/src/lib.rs index 86141281..b96f7231 100644 --- a/cosmic-applet-minimize/src/lib.rs +++ b/cosmic-applet-minimize/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod localize; pub(crate) mod wayland_handler; pub(crate) mod wayland_subscription; diff --git a/cosmic-applet-minimize/src/localize.rs b/cosmic-applet-minimize/src/localize.rs index 44521f68..27e874db 100644 --- a/cosmic-applet-minimize/src/localize.rs +++ b/cosmic-applet-minimize/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-minimize/src/main.rs b/cosmic-applet-minimize/src/main.rs index 74b3cb32..15fdf31b 100644 --- a/cosmic-applet-minimize/src/main.rs +++ b/cosmic-applet-minimize/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-minimize/src/wayland_handler.rs b/cosmic-applet-minimize/src/wayland_handler.rs index a98c2539..52b5a438 100644 --- a/cosmic-applet-minimize/src/wayland_handler.rs +++ b/cosmic-applet-minimize/src/wayland_handler.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::wayland_subscription::{ ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, }; diff --git a/cosmic-applet-minimize/src/wayland_subscription.rs b/cosmic-applet-minimize/src/wayland_subscription.rs index 2372a6ee..2edee000 100644 --- a/cosmic-applet-minimize/src/wayland_subscription.rs +++ b/cosmic-applet-minimize/src/wayland_subscription.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + //! # DBus interface proxy for: `org.freedesktop.UPower.KbdBacklight` //! //! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data. diff --git a/cosmic-applet-minimize/src/window_image.rs b/cosmic-applet-minimize/src/window_image.rs index f347ff51..5790ab80 100644 --- a/cosmic-applet-minimize/src/window_image.rs +++ b/cosmic-applet-minimize/src/window_image.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::{ desktop::IconSource, iced::Limits, diff --git a/cosmic-applet-notifications/Cargo.toml b/cosmic-applet-notifications/Cargo.toml index 27dc9804..c08fe2d9 100644 --- a/cosmic-applet-notifications/Cargo.toml +++ b/cosmic-applet-notifications/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-applet-notifications" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] anyhow.workspace = true diff --git a/cosmic-applet-notifications/src/lib.rs b/cosmic-applet-notifications/src/lib.rs index cad3c299..1efdac8e 100644 --- a/cosmic-applet-notifications/src/lib.rs +++ b/cosmic-applet-notifications/src/lib.rs @@ -1,9 +1,12 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod localize; mod subscriptions; use cosmic::applet::token::subscription::{ activation_token_subscription, TokenRequest, TokenUpdate, }; -use cosmic::applet::{menu_button, menu_control_padding, padded_control}; +use cosmic::applet::{menu_control_padding, padded_control}; use cosmic::cctk::sctk::reexports::calloop; use cosmic::cosmic_config::{Config, CosmicConfigEntry}; use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; diff --git a/cosmic-applet-notifications/src/localize.rs b/cosmic-applet-notifications/src/localize.rs index 8f87ca3e..fea2f3ec 100644 --- a/cosmic-applet-notifications/src/localize.rs +++ b/cosmic-applet-notifications/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use cosmic_time::once_cell::sync::Lazy; use i18n_embed::{ diff --git a/cosmic-applet-notifications/src/main.rs b/cosmic-applet-notifications/src/main.rs index 5f10e1c1..3557b7b6 100644 --- a/cosmic-applet-notifications/src/main.rs +++ b/cosmic-applet-notifications/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-notifications/src/subscriptions/dbus.rs b/cosmic-applet-notifications/src/subscriptions/dbus.rs index 97ecb941..c1dcc304 100644 --- a/cosmic-applet-notifications/src/subscriptions/dbus.rs +++ b/cosmic-applet-notifications/src/subscriptions/dbus.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::subscriptions::freedesktop_proxy::NotificationsProxy; use cosmic::{ iced::{ diff --git a/cosmic-applet-notifications/src/subscriptions/mod.rs b/cosmic-applet-notifications/src/subscriptions/mod.rs index 11313be8..35a4a9e6 100644 --- a/cosmic-applet-notifications/src/subscriptions/mod.rs +++ b/cosmic-applet-notifications/src/subscriptions/mod.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub mod dbus; mod freedesktop_proxy; pub mod notifications; diff --git a/cosmic-applet-notifications/src/subscriptions/notifications.rs b/cosmic-applet-notifications/src/subscriptions/notifications.rs index e1d6ecdc..d4eded73 100644 --- a/cosmic-applet-notifications/src/subscriptions/notifications.rs +++ b/cosmic-applet-notifications/src/subscriptions/notifications.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::{ iced::{futures, subscription}, iced_futures::Subscription, diff --git a/cosmic-applet-power/Cargo.toml b/cosmic-applet-power/Cargo.toml index 08399fd3..79788b64 100644 --- a/cosmic-applet-power/Cargo.toml +++ b/cosmic-applet-power/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-applet-power" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] i18n-embed-fl.workspace = true diff --git a/cosmic-applet-power/src/cosmic_session.rs b/cosmic-applet-power/src/cosmic_session.rs index 5d00dee5..94c04518 100644 --- a/cosmic-applet-power/src/cosmic_session.rs +++ b/cosmic-applet-power/src/cosmic_session.rs @@ -1,4 +1,6 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use zbus::dbus_proxy; #[dbus_proxy( diff --git a/cosmic-applet-power/src/lib.rs b/cosmic-applet-power/src/lib.rs index 1aa38ee8..88df9c56 100644 --- a/cosmic-applet-power/src/lib.rs +++ b/cosmic-applet-power/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::collections::HashMap; use std::process; use std::time::Duration; diff --git a/cosmic-applet-power/src/localize.rs b/cosmic-applet-power/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-power/src/localize.rs +++ b/cosmic-applet-power/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-power/src/main.rs b/cosmic-applet-power/src/main.rs index 4a6c241e..0c7ca782 100644 --- a/cosmic-applet-power/src/main.rs +++ b/cosmic-applet-power/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-power/src/session_manager.rs b/cosmic-applet-power/src/session_manager.rs index 6d87cbc8..5041918a 100644 --- a/cosmic-applet-power/src/session_manager.rs +++ b/cosmic-applet-power/src/session_manager.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only //! # DBus interface proxy for: `org.gnome.SessionManager` //! //! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data. diff --git a/cosmic-applet-status-area/Cargo.toml b/cosmic-applet-status-area/Cargo.toml index 387e7c8a..9731a11e 100644 --- a/cosmic-applet-status-area/Cargo.toml +++ b/cosmic-applet-status-area/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-applet-status-area" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] futures.workspace = true diff --git a/cosmic-applet-status-area/src/components/app.rs b/cosmic-applet-status-area/src/components/app.rs index f234dadc..4ddc2bff 100644 --- a/cosmic-applet-status-area/src/components/app.rs +++ b/cosmic-applet-status-area/src/components/app.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::{ app::{self, Command}, applet::cosmic_panel_config::PanelAnchor, diff --git a/cosmic-applet-status-area/src/components/mod.rs b/cosmic-applet-status-area/src/components/mod.rs index d73d0fa3..41c76b57 100644 --- a/cosmic-applet-status-area/src/components/mod.rs +++ b/cosmic-applet-status-area/src/components/mod.rs @@ -1,2 +1,5 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub mod app; pub mod status_menu; diff --git a/cosmic-applet-status-area/src/components/status_menu.rs b/cosmic-applet-status-area/src/components/status_menu.rs index 3607f8eb..23306a64 100644 --- a/cosmic-applet-status-area/src/components/status_menu.rs +++ b/cosmic-applet-status-area/src/components/status_menu.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::applet::menu_button; use cosmic::{iced, widget::icon}; diff --git a/cosmic-applet-status-area/src/lib.rs b/cosmic-applet-status-area/src/lib.rs index 16f6875c..371b8aff 100644 --- a/cosmic-applet-status-area/src/lib.rs +++ b/cosmic-applet-status-area/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod components; mod subscriptions; diff --git a/cosmic-applet-status-area/src/main.rs b/cosmic-applet-status-area/src/main.rs index 890c416e..213110e4 100644 --- a/cosmic-applet-status-area/src/main.rs +++ b/cosmic-applet-status-area/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-status-area/src/subscriptions/mod.rs b/cosmic-applet-status-area/src/subscriptions/mod.rs index 3bd364d3..025e0936 100644 --- a/cosmic-applet-status-area/src/subscriptions/mod.rs +++ b/cosmic-applet-status-area/src/subscriptions/mod.rs @@ -1,2 +1,5 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub mod status_notifier_item; pub mod status_notifier_watcher; diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs index 2aaa7358..31a6cfd6 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_item.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::{iced, widget::icon}; use futures::{FutureExt, StreamExt}; use zbus::zvariant::{self, OwnedValue}; diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/client.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/client.rs index 8971e74b..5587b37d 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/client.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/client.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use futures::{Stream, StreamExt}; use std::pin::Pin; diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/mod.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/mod.rs index a4cd4b88..c0319b31 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/mod.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/mod.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + // TODO: Both this and server proxy could emit same events, have way to generate stream from either? use cosmic::iced; diff --git a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs index 4352064c..4550336f 100644 --- a/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs +++ b/cosmic-applet-status-area/src/subscriptions/status_notifier_watcher/server.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + // TODO: `g_bus_own_name` like abstraction in zbus #![allow(non_snake_case)] diff --git a/cosmic-applet-tiling/Cargo.toml b/cosmic-applet-tiling/Cargo.toml index bd2a9cb9..4789d608 100644 --- a/cosmic-applet-tiling/Cargo.toml +++ b/cosmic-applet-tiling/Cargo.toml @@ -2,9 +2,7 @@ name = "cosmic-applet-tiling" version = "0.1.0" edition = "2021" - - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +license = "GPL-3.0" [dependencies] libcosmic.workspace = true diff --git a/cosmic-applet-tiling/src/lib.rs b/cosmic-applet-tiling/src/lib.rs index aef763b1..77cd41ad 100644 --- a/cosmic-applet-tiling/src/lib.rs +++ b/cosmic-applet-tiling/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::window::Window; mod localize; diff --git a/cosmic-applet-tiling/src/localize.rs b/cosmic-applet-tiling/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-tiling/src/localize.rs +++ b/cosmic-applet-tiling/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-tiling/src/main.rs b/cosmic-applet-tiling/src/main.rs index 85f11610..cedc04e2 100644 --- a/cosmic-applet-tiling/src/main.rs +++ b/cosmic-applet-tiling/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-tiling/src/wayland.rs b/cosmic-applet-tiling/src/wayland.rs index 0dd514bc..caf5b9ff 100644 --- a/cosmic-applet-tiling/src/wayland.rs +++ b/cosmic-applet-tiling/src/wayland.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use calloop::channel::*; use cctk::{ sctk::{ diff --git a/cosmic-applet-tiling/src/wayland_subscription.rs b/cosmic-applet-tiling/src/wayland_subscription.rs index 31ec4fc4..cfe25f0e 100644 --- a/cosmic-applet-tiling/src/wayland_subscription.rs +++ b/cosmic-applet-tiling/src/wayland_subscription.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::wayland::{self}; use cctk::sctk::reexports::calloop::channel::SyncSender; use cosmic::iced::{ diff --git a/cosmic-applet-tiling/src/window.rs b/cosmic-applet-tiling/src/window.rs index 609a627d..5c87bdc6 100644 --- a/cosmic-applet-tiling/src/window.rs +++ b/cosmic-applet-tiling/src/window.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::wayland_subscription::WorkspacesUpdate; use crate::{fl, wayland_subscription}; use cctk::sctk::reexports::calloop::channel::SyncSender; diff --git a/cosmic-applet-time/Cargo.toml b/cosmic-applet-time/Cargo.toml index a4718cd2..0fa2700a 100644 --- a/cosmic-applet-time/Cargo.toml +++ b/cosmic-applet-time/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-applet-time" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] chrono = { version = "0.4.35", features = ["clock"] } diff --git a/cosmic-applet-time/src/config.rs b/cosmic-applet-time/src/config.rs index 97ce9212..c690e53a 100644 --- a/cosmic-applet-time/src/config.rs +++ b/cosmic-applet-time/src/config.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry; use cosmic::cosmic_config::{self, CosmicConfigEntry}; diff --git a/cosmic-applet-time/src/lib.rs b/cosmic-applet-time/src/lib.rs index 4dc512fb..0dccbd7b 100644 --- a/cosmic-applet-time/src/lib.rs +++ b/cosmic-applet-time/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod config; mod localize; mod time; diff --git a/cosmic-applet-time/src/localize.rs b/cosmic-applet-time/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-time/src/localize.rs +++ b/cosmic-applet-time/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-time/src/main.rs b/cosmic-applet-time/src/main.rs index 61dc0913..7fbb932b 100644 --- a/cosmic-applet-time/src/main.rs +++ b/cosmic-applet-time/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-time/src/time.rs b/cosmic-applet-time/src/time.rs index 485e6c17..4fcb1288 100644 --- a/cosmic-applet-time/src/time.rs +++ b/cosmic-applet-time/src/time.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use chrono::{Datelike, Days, NaiveDate, Weekday}; /// Gets the first date that will be visible on the calender diff --git a/cosmic-applet-time/src/window.rs b/cosmic-applet-time/src/window.rs index 438dfa0d..281085b9 100644 --- a/cosmic-applet-time/src/window.rs +++ b/cosmic-applet-time/src/window.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::applet::{menu_button, padded_control}; use cosmic::cctk::sctk::reexports::calloop; use cosmic::iced::wayland::popup::{destroy_popup, get_popup}; diff --git a/cosmic-applet-workspaces/Cargo.toml b/cosmic-applet-workspaces/Cargo.toml index 78619182..1a5c365d 100644 --- a/cosmic-applet-workspaces/Cargo.toml +++ b/cosmic-applet-workspaces/Cargo.toml @@ -3,6 +3,7 @@ name = "cosmic-applet-workspaces" version = "0.1.1" authors = ["Ashley Wulber "] edition = "2021" +license = "GPL-3.0" [dependencies] libcosmic.workspace = true diff --git a/cosmic-applet-workspaces/src/colors.rs b/cosmic-applet-workspaces/src/colors.rs index b9909913..76a4c308 100644 --- a/cosmic-applet-workspaces/src/colors.rs +++ b/cosmic-applet-workspaces/src/colors.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use std::{ collections::HashMap, fs::File, diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index 9f39cf76..fd410e12 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cctk::sctk::reexports::{calloop::channel::SyncSender, client::backend::ObjectId}; use cosmic::iced::alignment::{Horizontal, Vertical}; use cosmic::iced::event; diff --git a/cosmic-applet-workspaces/src/components/mod.rs b/cosmic-applet-workspaces/src/components/mod.rs index 309be628..194b80fb 100644 --- a/cosmic-applet-workspaces/src/components/mod.rs +++ b/cosmic-applet-workspaces/src/components/mod.rs @@ -1 +1,4 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub mod app; diff --git a/cosmic-applet-workspaces/src/config.rs b/cosmic-applet-workspaces/src/config.rs index ac2bb33b..1071055b 100644 --- a/cosmic-applet-workspaces/src/config.rs +++ b/cosmic-applet-workspaces/src/config.rs @@ -1 +1,4 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + pub const APP_ID: &str = "com.system76.CosmicWorkspacesApplet"; diff --git a/cosmic-applet-workspaces/src/lib.rs b/cosmic-applet-workspaces/src/lib.rs index 920bd534..3cd335a1 100644 --- a/cosmic-applet-workspaces/src/lib.rs +++ b/cosmic-applet-workspaces/src/lib.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + mod components; #[rustfmt::skip] mod config; diff --git a/cosmic-applet-workspaces/src/localize.rs b/cosmic-applet-workspaces/src/localize.rs index baa05d0d..b69ee397 100644 --- a/cosmic-applet-workspaces/src/localize.rs +++ b/cosmic-applet-workspaces/src/localize.rs @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: MPL-2.0-only +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, diff --git a/cosmic-applet-workspaces/src/main.rs b/cosmic-applet-workspaces/src/main.rs index fc9879c2..66c4e1c3 100644 --- a/cosmic-applet-workspaces/src/main.rs +++ b/cosmic-applet-workspaces/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-applet-workspaces/src/wayland.rs b/cosmic-applet-workspaces/src/wayland.rs index 269df6ba..b6403bed 100644 --- a/cosmic-applet-workspaces/src/wayland.rs +++ b/cosmic-applet-workspaces/src/wayland.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use calloop::channel::*; use cctk::{ sctk::{ diff --git a/cosmic-applet-workspaces/src/wayland_subscription.rs b/cosmic-applet-workspaces/src/wayland_subscription.rs index 4b583f3d..1cdb227a 100644 --- a/cosmic-applet-workspaces/src/wayland_subscription.rs +++ b/cosmic-applet-workspaces/src/wayland_subscription.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use crate::wayland::{self, WorkspaceEvent, WorkspaceList}; use cctk::sctk::reexports::calloop::channel::SyncSender; use cosmic::iced::{ diff --git a/cosmic-applets/Cargo.toml b/cosmic-applets/Cargo.toml index a5712b89..da171d59 100644 --- a/cosmic-applets/Cargo.toml +++ b/cosmic-applets/Cargo.toml @@ -2,6 +2,7 @@ name = "cosmic-applets" version = "0.1.1" edition = "2021" +license = "GPL-3.0" [dependencies] cosmic-app-list = { path = "../cosmic-app-list" } diff --git a/cosmic-applets/src/main.rs b/cosmic-applets/src/main.rs index e2f041b7..d60bd508 100644 --- a/cosmic-applets/src/main.rs +++ b/cosmic-applets/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() -> cosmic::iced::Result { diff --git a/cosmic-panel-button/Cargo.toml b/cosmic-panel-button/Cargo.toml index a888d865..7690c2d0 100644 --- a/cosmic-panel-button/Cargo.toml +++ b/cosmic-panel-button/Cargo.toml @@ -2,7 +2,7 @@ name = "cosmic-panel-button" version = "0.1.0" edition = "2021" -license = "GPL-3.0-or-later" +license = "GPL-3.0" [dependencies] freedesktop-desktop-entry = "0.5.1" diff --git a/cosmic-panel-button/src/main.rs b/cosmic-panel-button/src/main.rs index 6e94f87d..7ac9be19 100644 --- a/cosmic-panel-button/src/main.rs +++ b/cosmic-panel-button/src/main.rs @@ -1,3 +1,6 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + use cosmic::applet::cosmic_panel_config::PanelAnchor; use cosmic::iced::Length; use cosmic::iced_widget::{row, text};