refactor: make app-tray config its own crate
This commit is contained in:
parent
8870851f81
commit
481573ec27
8 changed files with 24 additions and 4 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
|
@ -887,6 +887,7 @@ name = "cosmic-app-list"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"cosmic-app-list-config",
|
||||||
"cosmic-client-toolkit",
|
"cosmic-client-toolkit",
|
||||||
"cosmic-protocols",
|
"cosmic-protocols",
|
||||||
"freedesktop-desktop-entry 0.6.2",
|
"freedesktop-desktop-entry 0.6.2",
|
||||||
|
|
@ -911,6 +912,14 @@ dependencies = [
|
||||||
"zbus 4.3.1",
|
"zbus 4.3.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cosmic-app-list-config"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"libcosmic",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-applet-audio"
|
name = "cosmic-applet-audio"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
default-members = ["cosmic-applets", "cosmic-panel-button"]
|
default-members = ["cosmic-applets", "cosmic-panel-button"]
|
||||||
members = [
|
members = [
|
||||||
"cosmic-app-list",
|
"cosmic-app-list",
|
||||||
|
"cosmic-app-list/cosmic-app-list-config",
|
||||||
"cosmic-applets",
|
"cosmic-applets",
|
||||||
"cosmic-applet-audio",
|
"cosmic-applet-audio",
|
||||||
"cosmic-applet-battery",
|
"cosmic-applet-battery",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ edition = "2021"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
cosmic-app-list-config = { path = "cosmic-app-list-config" }
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
cctk.workspace = true
|
cctk.workspace = true
|
||||||
cosmic-protocols.workspace = true
|
cosmic-protocols.workspace = true
|
||||||
|
|
|
||||||
11
cosmic-app-list/cosmic-app-list-config/Cargo.toml
Normal file
11
cosmic-app-list/cosmic-app-list-config/Cargo.toml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[package]
|
||||||
|
name = "cosmic-app-list-config"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libcosmic.workspace = true
|
||||||
|
libcosmic.features = []
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config,
|
|
||||||
config::{AppListConfig, APP_ID},
|
|
||||||
fl,
|
fl,
|
||||||
wayland_subscription::{
|
wayland_subscription::{
|
||||||
wayland_subscription, OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage,
|
wayland_subscription, OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage,
|
||||||
|
|
@ -53,6 +51,7 @@ use cosmic::{
|
||||||
},
|
},
|
||||||
Apply, Command, Element, Theme,
|
Apply, Command, Element, Theme,
|
||||||
};
|
};
|
||||||
|
use cosmic_app_list_config::{AppListConfig, APP_ID};
|
||||||
use cosmic_protocols::{
|
use cosmic_protocols::{
|
||||||
toplevel_info::v1::client::zcosmic_toplevel_handle_v1::{State, ZcosmicToplevelHandleV1},
|
toplevel_info::v1::client::zcosmic_toplevel_handle_v1::{State, ZcosmicToplevelHandleV1},
|
||||||
workspace::v1::client::zcosmic_workspace_handle_v1::ZcosmicWorkspaceHandleV1,
|
workspace::v1::client::zcosmic_workspace_handle_v1::ZcosmicWorkspaceHandleV1,
|
||||||
|
|
@ -621,7 +620,7 @@ impl cosmic::Application for CosmicAppList {
|
||||||
type Message = Message;
|
type Message = Message;
|
||||||
type Executor = cosmic::SingleThreadExecutor;
|
type Executor = cosmic::SingleThreadExecutor;
|
||||||
type Flags = ();
|
type Flags = ();
|
||||||
const APP_ID: &'static str = config::APP_ID;
|
const APP_ID: &'static str = APP_ID;
|
||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
core: cosmic::app::Core,
|
core: cosmic::app::Core,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod config;
|
|
||||||
mod localize;
|
mod localize;
|
||||||
mod wayland_handler;
|
mod wayland_handler;
|
||||||
mod wayland_subscription;
|
mod wayland_subscription;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue