chore: add SPDX license identifiers
This commit is contained in:
parent
b9308af4b7
commit
8527257ddd
96 changed files with 275 additions and 39 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
name = "cosmic-app-list"
|
name = "cosmic-app-list"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::config;
|
use crate::config;
|
||||||
use crate::config::AppListConfig;
|
use crate::config::AppListConfig;
|
||||||
use crate::config::APP_ID;
|
use crate::config::APP_ID;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
||||||
use cosmic::cosmic_config::{self, Config, CosmicConfigEntry};
|
use cosmic::cosmic_config::{self, Config, CosmicConfigEntry};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod config;
|
mod config;
|
||||||
mod localize;
|
mod localize;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::wayland_subscription::{
|
use crate::wayland_subscription::{
|
||||||
OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
name = "cosmic-applet-audio"
|
name = "cosmic-applet-audio"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cosmic-time.workspace = true
|
cosmic-time.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
||||||
use cosmic::cosmic_config::{self, CosmicConfigEntry};
|
use cosmic::cosmic_config::{self, CosmicConfigEntry};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod localize;
|
mod localize;
|
||||||
|
|
||||||
use crate::localize::localize;
|
use crate::localize::localize;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic_time::once_cell::sync::Lazy;
|
use cosmic_time::once_cell::sync::Lazy;
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn main() -> cosmic::iced::Result {
|
pub fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::{borrow::Cow, fmt::Debug, hash::Hash, path::PathBuf};
|
use std::{borrow::Cow, fmt::Debug, hash::Hash, path::PathBuf};
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::{rc::Rc, thread};
|
use std::{rc::Rc, thread};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
name = "cosmic-applet-battery"
|
name = "cosmic-applet-battery"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cosmic-time.workspace = true
|
cosmic-time.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::backend::{power_profile_subscription, Power, PowerProfileRequest, PowerProfileUpdate};
|
use crate::backend::{power_profile_subscription, Power, PowerProfileRequest, PowerProfileUpdate};
|
||||||
use crate::backlight::{
|
use crate::backlight::{
|
||||||
screen_backlight_subscription, ScreenBacklightRequest, ScreenBacklightUpdate,
|
screen_backlight_subscription, ScreenBacklightRequest, ScreenBacklightUpdate,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::iced::{self, futures::SinkExt, subscription};
|
use cosmic::iced::{self, futures::SinkExt, subscription};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
// TODO: use udev to monitor for brightness changes?
|
// TODO: use udev to monitor for brightness changes?
|
||||||
// How should key bindings be handled? Need something like gnome-settings-daemon?
|
// How should key bindings be handled? Need something like gnome-settings-daemon?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub const APP_ID: &str = "com.system76.CosmicAppletButton";
|
pub const APP_ID: &str = "com.system76.CosmicAppletButton";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
ffi::{OsStr, OsString},
|
ffi::{OsStr, OsString},
|
||||||
fmt::{self, Debug},
|
fmt::{self, Debug},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
mod backlight;
|
mod backlight;
|
||||||
mod app;
|
mod app;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-applet-bluetooth"
|
name = "cosmic-applet-bluetooth"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::bluetooth::{BluerDeviceStatus, BluerRequest, BluerState};
|
use crate::bluetooth::{BluerDeviceStatus, BluerRequest, BluerState};
|
||||||
use cosmic::applet::token::subscription::{
|
use cosmic::applet::token::subscription::{
|
||||||
activation_token_subscription, TokenRequest, TokenUpdate,
|
activation_token_subscription, TokenRequest, TokenUpdate,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::{collections::HashMap, fmt::Debug, hash::Hash, mem, sync::Arc, time::Duration};
|
use std::{collections::HashMap, fmt::Debug, hash::Hash, mem, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use bluer::{
|
use bluer::{
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub const APP_ID: &str = "com.system76.CosmicAppletBluetooth";
|
pub const APP_ID: &str = "com.system76.CosmicAppletBluetooth";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod bluetooth;
|
mod bluetooth;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
name = "cosmic-applet-input-sources"
|
name = "cosmic-applet-input-sources"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cosmic-time.workspace = true
|
cosmic-time.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
|
use cosmic::cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
|
||||||
use cosmic_comp_config::XkbConfig;
|
use cosmic_comp_config::XkbConfig;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
pub const CONFIG_VERSION: u64 = 1;
|
pub const CONFIG_VERSION: u64 = 1;
|
||||||
|
|
||||||
#[derive(Clone, CosmicConfigEntry, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
#[derive(Clone, CosmicConfigEntry, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
||||||
pub struct Config {}
|
pub struct Config {}
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
|
|
@ -9,6 +14,7 @@ impl Default for Config {
|
||||||
Self {}
|
Self {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, CosmicConfigEntry, Debug, Deserialize, PartialEq, Serialize, Default)]
|
#[derive(Clone, CosmicConfigEntry, Debug, Deserialize, PartialEq, Serialize, Default)]
|
||||||
pub struct CosmicCompConfig {
|
pub struct CosmicCompConfig {
|
||||||
pub xkb_config: XkbConfig,
|
pub xkb_config: XkbConfig,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::window::Window;
|
use crate::window::Window;
|
||||||
use config::{Config, CONFIG_VERSION};
|
use config::{Config, CONFIG_VERSION};
|
||||||
use cosmic::cosmic_config;
|
use cosmic::cosmic_config;
|
||||||
|
|
@ -23,31 +26,32 @@ pub fn run() -> cosmic::iced::Result {
|
||||||
let config = match Config::get_entry(&config_handler) {
|
let config = match Config::get_entry(&config_handler) {
|
||||||
Ok(ok) => ok,
|
Ok(ok) => ok,
|
||||||
Err((errs, config)) => {
|
Err((errs, config)) => {
|
||||||
eprintln!("errors loading config: {:?}", errs);
|
tracing::error!("errors loading config: {:?}", errs);
|
||||||
config
|
config
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
(Some(config_handler), config)
|
(Some(config_handler), config)
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("failed to create config handler: {}", err);
|
tracing::error!("failed to create config handler: {}", err);
|
||||||
(None, Config::default())
|
(None, Config::default())
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let (comp_config_handler, comp_config) =
|
let (comp_config_handler, comp_config) =
|
||||||
match cosmic_config::Config::new("com.system76.CosmicComp", CosmicCompConfig::VERSION) {
|
match cosmic_config::Config::new("com.system76.CosmicComp", CosmicCompConfig::VERSION) {
|
||||||
Ok(config_handler) => {
|
Ok(config_handler) => {
|
||||||
let config = match CosmicCompConfig::get_entry(&config_handler) {
|
let config = match CosmicCompConfig::get_entry(&config_handler) {
|
||||||
Ok(ok) => ok,
|
Ok(ok) => ok,
|
||||||
Err((errs, config)) => {
|
Err((errs, config)) => {
|
||||||
eprintln!("errors loading config: {:?}", errs);
|
tracing::error!("errors loading config: {:?}", errs);
|
||||||
config
|
config
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
(Some(config_handler), config)
|
(Some(config_handler), config)
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("failed to create config handler: {}", err);
|
tracing::error!("failed to create config handler: {}", err);
|
||||||
(None, CosmicCompConfig::default())
|
(None, CosmicCompConfig::default())
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
DefaultLocalizer, LanguageLoader, Localizer,
|
DefaultLocalizer, LanguageLoader, Localizer,
|
||||||
};
|
};
|
||||||
|
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use rust_embed::RustEmbed;
|
use rust_embed::RustEmbed;
|
||||||
|
|
||||||
#[derive(RustEmbed)]
|
#[derive(RustEmbed)]
|
||||||
#[folder = "i18n/"]
|
#[folder = "i18n/"]
|
||||||
struct Localizations;
|
struct Localizations;
|
||||||
|
|
||||||
pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
|
pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
|
||||||
let loader: FluentLanguageLoader = fluent_language_loader!();
|
let loader: FluentLanguageLoader = fluent_language_loader!();
|
||||||
loader
|
loader
|
||||||
|
|
@ -14,6 +20,7 @@ pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
|
||||||
.expect("Error while loading fallback language");
|
.expect("Error while loading fallback language");
|
||||||
loader
|
loader
|
||||||
});
|
});
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! fl {
|
macro_rules! fl {
|
||||||
($message_id:literal) => {{
|
($message_id:literal) => {{
|
||||||
|
|
@ -23,14 +30,16 @@ macro_rules! fl {
|
||||||
i18n_embed_fl::fl!($crate::localize::LANGUAGE_LOADER, $message_id, $($args), *)
|
i18n_embed_fl::fl!($crate::localize::LANGUAGE_LOADER, $message_id, $($args), *)
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the `Localizer` to be used for localizing this library.
|
// Get the `Localizer` to be used for localizing this library.
|
||||||
pub fn localizer() -> Box<dyn Localizer> {
|
pub fn localizer() -> Box<dyn Localizer> {
|
||||||
Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations))
|
Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn localize() {
|
pub fn localize() {
|
||||||
let localizer = localizer();
|
let localizer = localizer();
|
||||||
let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages();
|
let requested_languages = i18n_embed::DesktopLanguageRequester::requested_languages();
|
||||||
if let Err(error) = localizer.select(&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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
tracing_subscriber::fmt::init();
|
tracing_subscriber::fmt::init();
|
||||||
let _ = tracing_log::LogTracer::init();
|
let _ = tracing_log::LogTracer::init();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2024 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::config::{Config, CONFIG_VERSION};
|
use crate::config::{Config, CONFIG_VERSION};
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use crate::fl;
|
use crate::fl;
|
||||||
|
|
@ -16,6 +19,7 @@ use cosmic::prelude::*;
|
||||||
use cosmic::widget;
|
use cosmic::widget;
|
||||||
use cosmic_comp_config::CosmicCompConfig;
|
use cosmic_comp_config::CosmicCompConfig;
|
||||||
use xkb_data::KeyboardLayouts;
|
use xkb_data::KeyboardLayouts;
|
||||||
|
|
||||||
pub const ID: &str = "com.system76.CosmicAppletInputSources";
|
pub const ID: &str = "com.system76.CosmicAppletInputSources";
|
||||||
|
|
||||||
pub struct Window {
|
pub struct Window {
|
||||||
|
|
@ -29,6 +33,7 @@ pub struct Window {
|
||||||
layouts: KeyboardLayouts,
|
layouts: KeyboardLayouts,
|
||||||
active_layouts: Vec<ActiveLayout>,
|
active_layouts: Vec<ActiveLayout>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Message {
|
pub enum Message {
|
||||||
Config(Config),
|
Config(Config),
|
||||||
|
|
@ -38,6 +43,7 @@ pub enum Message {
|
||||||
SetActiveLayout(ActiveLayout),
|
SetActiveLayout(ActiveLayout),
|
||||||
KeyboardSettings,
|
KeyboardSettings,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Flags {
|
pub struct Flags {
|
||||||
pub config_handler: Option<cosmic_config::Config>,
|
pub config_handler: Option<cosmic_config::Config>,
|
||||||
|
|
@ -46,6 +52,7 @@ pub struct Flags {
|
||||||
pub comp_config_handler: Option<cosmic_config::Config>,
|
pub comp_config_handler: Option<cosmic_config::Config>,
|
||||||
pub layouts: KeyboardLayouts,
|
pub layouts: KeyboardLayouts,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cosmic::Application for Window {
|
impl cosmic::Application for Window {
|
||||||
type Executor = cosmic::SingleThreadExecutor;
|
type Executor = cosmic::SingleThreadExecutor;
|
||||||
type Flags = Flags;
|
type Flags = Flags;
|
||||||
|
|
@ -145,7 +152,7 @@ impl cosmic::Application for Window {
|
||||||
if let Err(err) =
|
if let Err(err) =
|
||||||
comp_config_handler.set("xkb_config", &self.comp_config.xkb_config)
|
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| {
|
.map(|update| {
|
||||||
if !update.errors.is_empty() {
|
if !update.errors.is_empty() {
|
||||||
eprintln!(
|
tracing::error!(
|
||||||
"errors loading config {:?}: {:?}",
|
"errors loading config {:?}: {:?}",
|
||||||
update.keys, update.errors
|
update.keys,
|
||||||
|
update.errors
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Message::Config(update.config)
|
Message::Config(update.config)
|
||||||
|
|
@ -216,9 +224,10 @@ impl cosmic::Application for Window {
|
||||||
.watch_config("com.system76.CosmicComp")
|
.watch_config("com.system76.CosmicComp")
|
||||||
.map(|update| {
|
.map(|update| {
|
||||||
if !update.errors.is_empty() {
|
if !update.errors.is_empty() {
|
||||||
eprintln!(
|
tracing::error!(
|
||||||
"errors loading config {:?}: {:?}",
|
"errors loading config {:?}: {:?}",
|
||||||
update.keys, update.errors
|
update.keys,
|
||||||
|
update.errors
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Message::CompConfig(update.config)
|
Message::CompConfig(update.config)
|
||||||
|
|
@ -278,6 +287,7 @@ impl Window {
|
||||||
active_layouts
|
active_layouts
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub struct ActiveLayout {
|
pub struct ActiveLayout {
|
||||||
layout: String,
|
layout: String,
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
name = "cosmic-applet-minimize"
|
name = "cosmic-applet-minimize"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod localize;
|
mod localize;
|
||||||
pub(crate) mod wayland_handler;
|
pub(crate) mod wayland_handler;
|
||||||
pub(crate) mod wayland_subscription;
|
pub(crate) mod wayland_subscription;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::wayland_subscription::{
|
use crate::wayland_subscription::{
|
||||||
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
//! # DBus interface proxy for: `org.freedesktop.UPower.KbdBacklight`
|
//! # DBus interface proxy for: `org.freedesktop.UPower.KbdBacklight`
|
||||||
//!
|
//!
|
||||||
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
desktop::IconSource,
|
desktop::IconSource,
|
||||||
iced::Limits,
|
iced::Limits,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-applet-notifications"
|
name = "cosmic-applet-notifications"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod localize;
|
mod localize;
|
||||||
mod subscriptions;
|
mod subscriptions;
|
||||||
use cosmic::applet::token::subscription::{
|
use cosmic::applet::token::subscription::{
|
||||||
activation_token_subscription, TokenRequest, TokenUpdate,
|
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::cctk::sctk::reexports::calloop;
|
||||||
use cosmic::cosmic_config::{Config, CosmicConfigEntry};
|
use cosmic::cosmic_config::{Config, CosmicConfigEntry};
|
||||||
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
|
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic_time::once_cell::sync::Lazy;
|
use cosmic_time::once_cell::sync::Lazy;
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::subscriptions::freedesktop_proxy::NotificationsProxy;
|
use crate::subscriptions::freedesktop_proxy::NotificationsProxy;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::{
|
iced::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub mod dbus;
|
pub mod dbus;
|
||||||
mod freedesktop_proxy;
|
mod freedesktop_proxy;
|
||||||
pub mod notifications;
|
pub mod notifications;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::{futures, subscription},
|
iced::{futures, subscription},
|
||||||
iced_futures::Subscription,
|
iced_futures::Subscription,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-applet-power"
|
name = "cosmic-applet-power"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
i18n-embed-fl.workspace = true
|
i18n-embed-fl.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use zbus::dbus_proxy;
|
use zbus::dbus_proxy;
|
||||||
|
|
||||||
#[dbus_proxy(
|
#[dbus_proxy(
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::process;
|
use std::process;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
//! # DBus interface proxy for: `org.gnome.SessionManager`
|
//! # DBus interface proxy for: `org.gnome.SessionManager`
|
||||||
//!
|
//!
|
||||||
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-applet-status-area"
|
name = "cosmic-applet-status-area"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
app::{self, Command},
|
app::{self, Command},
|
||||||
applet::cosmic_panel_config::PanelAnchor,
|
applet::cosmic_panel_config::PanelAnchor,
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub mod app;
|
pub mod app;
|
||||||
pub mod status_menu;
|
pub mod status_menu;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::applet::menu_button;
|
use cosmic::applet::menu_button;
|
||||||
use cosmic::{iced, widget::icon};
|
use cosmic::{iced, widget::icon};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod components;
|
mod components;
|
||||||
mod subscriptions;
|
mod subscriptions;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub mod status_notifier_item;
|
pub mod status_notifier_item;
|
||||||
pub mod status_notifier_watcher;
|
pub mod status_notifier_watcher;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::{iced, widget::icon};
|
use cosmic::{iced, widget::icon};
|
||||||
use futures::{FutureExt, StreamExt};
|
use futures::{FutureExt, StreamExt};
|
||||||
use zbus::zvariant::{self, OwnedValue};
|
use zbus::zvariant::{self, OwnedValue};
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use futures::{Stream, StreamExt};
|
use futures::{Stream, StreamExt};
|
||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
// TODO: Both this and server proxy could emit same events, have way to generate stream from either?
|
// TODO: Both this and server proxy could emit same events, have way to generate stream from either?
|
||||||
|
|
||||||
use cosmic::iced;
|
use cosmic::iced;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
// TODO: `g_bus_own_name` like abstraction in zbus
|
// TODO: `g_bus_own_name` like abstraction in zbus
|
||||||
|
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
name = "cosmic-applet-tiling"
|
name = "cosmic-applet-tiling"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
libcosmic.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::window::Window;
|
use crate::window::Window;
|
||||||
|
|
||||||
mod localize;
|
mod localize;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use calloop::channel::*;
|
use calloop::channel::*;
|
||||||
use cctk::{
|
use cctk::{
|
||||||
sctk::{
|
sctk::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::wayland::{self};
|
use crate::wayland::{self};
|
||||||
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::wayland_subscription::WorkspacesUpdate;
|
use crate::wayland_subscription::WorkspacesUpdate;
|
||||||
use crate::{fl, wayland_subscription};
|
use crate::{fl, wayland_subscription};
|
||||||
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-applet-time"
|
name = "cosmic-applet-time"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version = "0.4.35", features = ["clock"] }
|
chrono = { version = "0.4.35", features = ["clock"] }
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
use cosmic::cosmic_config::cosmic_config_derive::CosmicConfigEntry;
|
||||||
use cosmic::cosmic_config::{self, CosmicConfigEntry};
|
use cosmic::cosmic_config::{self, CosmicConfigEntry};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod config;
|
mod config;
|
||||||
mod localize;
|
mod localize;
|
||||||
mod time;
|
mod time;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use chrono::{Datelike, Days, NaiveDate, Weekday};
|
use chrono::{Datelike, Days, NaiveDate, Weekday};
|
||||||
|
|
||||||
/// Gets the first date that will be visible on the calender
|
/// Gets the first date that will be visible on the calender
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::applet::{menu_button, padded_control};
|
use cosmic::applet::{menu_button, padded_control};
|
||||||
use cosmic::cctk::sctk::reexports::calloop;
|
use cosmic::cctk::sctk::reexports::calloop;
|
||||||
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
|
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ name = "cosmic-applet-workspaces"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
authors = ["Ashley Wulber <ashley@system76.com>"]
|
authors = ["Ashley Wulber <ashley@system76.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libcosmic.workspace = true
|
libcosmic.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
fs::File,
|
fs::File,
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cctk::sctk::reexports::{calloop::channel::SyncSender, client::backend::ObjectId};
|
use cctk::sctk::reexports::{calloop::channel::SyncSender, client::backend::ObjectId};
|
||||||
use cosmic::iced::alignment::{Horizontal, Vertical};
|
use cosmic::iced::alignment::{Horizontal, Vertical};
|
||||||
use cosmic::iced::event;
|
use cosmic::iced::event;
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub mod app;
|
pub mod app;
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
pub const APP_ID: &str = "com.system76.CosmicWorkspacesApplet";
|
pub const APP_ID: &str = "com.system76.CosmicWorkspacesApplet";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod components;
|
mod components;
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
mod config;
|
mod config;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// SPDX-License-Identifier: MPL-2.0-only
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use i18n_embed::{
|
use i18n_embed::{
|
||||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use calloop::channel::*;
|
use calloop::channel::*;
|
||||||
use cctk::{
|
use cctk::{
|
||||||
sctk::{
|
sctk::{
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::wayland::{self, WorkspaceEvent, WorkspaceList};
|
use crate::wayland::{self, WorkspaceEvent, WorkspaceList};
|
||||||
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
||||||
use cosmic::iced::{
|
use cosmic::iced::{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
name = "cosmic-applets"
|
name = "cosmic-applets"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cosmic-app-list = { path = "../cosmic-app-list" }
|
cosmic-app-list = { path = "../cosmic-app-list" }
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn main() -> cosmic::iced::Result {
|
fn main() -> cosmic::iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
name = "cosmic-panel-button"
|
name = "cosmic-panel-button"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
freedesktop-desktop-entry = "0.5.1"
|
freedesktop-desktop-entry = "0.5.1"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright 2023 System76 <info@system76.com>
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use cosmic::applet::cosmic_panel_config::PanelAnchor;
|
use cosmic::applet::cosmic_panel_config::PanelAnchor;
|
||||||
use cosmic::iced::Length;
|
use cosmic::iced::Length;
|
||||||
use cosmic::iced_widget::{row, text};
|
use cosmic::iced_widget::{row, text};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue