refactor: move projects into a workspace

This commit is contained in:
Ashley Wulber 2022-12-23 15:14:15 -05:00 committed by Ashley Wulber
parent 2a417a9156
commit a1aa87f5bd
29 changed files with 1105 additions and 28224 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,7 @@ edition = "2021"
[dependencies]
once_cell = "1.16.0"
libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["wayland", "applet"] }
cosmic-panel-config = {git = "https://github.com/pop-os/cosmic-panel", default-features = false }
iced_sctk = { git = "https://github.com/pop-os/iced-sctk" }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", version = "0.16" }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "73346019952f82ec7e4d4d15f5d66841b54e8b61" }
futures = "0.3"
zbus = { version = "3.5", no-default-features = true }
log = "0.4"
@ -18,10 +16,3 @@ i18n-embed = { version = "0.13.4", features = ["fluent-system", "desktop-request
i18n-embed-fl = "0.6.4"
rust-embed = "6.3.0"
tokio = { version = "1.17.0", features = ["sync", "rt", "rt-multi-thread", "fs"] }
[dependencies.iced]
git = "https://github.com/pop-os/iced.git"
branch = "sctk-cosmic"
# path = "../iced"
default-features = false
features = ["image", "svg", "tokio", "wayland"]

View file

@ -9,23 +9,18 @@ use crate::upower_kbdbacklight::{
};
use cosmic::applet::CosmicAppletHelper;
use cosmic::iced::alignment::Horizontal;
use cosmic::iced::wayland::SurfaceIdWrapper;
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
use cosmic::iced::{
executor,
widget::{button, column, row, text, slider},
window, Alignment, Application, Command, Length, Subscription,
};
use cosmic::iced_native::window::Settings;
use cosmic::iced_style::application::{self, Appearance};
use cosmic::iced_style::svg;
use cosmic::iced_style::{svg, Color};
use cosmic::theme::{self, Svg};
use cosmic::widget::{icon, toggler, horizontal_rule};
use cosmic::{iced_style, settings, Element, Theme};
use cosmic_panel_config::{PanelAnchor, PanelSize};
use iced_sctk::application::SurfaceIdWrapper;
use iced_sctk::command::platform_specific::wayland::window::SctkWindowSettings;
use iced_sctk::commands::popup::{destroy_popup, get_popup};
use iced_sctk::settings::InitialSurface;
use iced_sctk::Color;
use std::time::Duration;
use tokio::sync::mpsc::UnboundedSender;
@ -206,10 +201,10 @@ impl Application for CosmicBatteryApplet {
self.applet_helper.popup_container(
column![
row![
icon(&self.icon_name, 24)
icon(&*self.icon_name, 24)
.style(Svg::Custom(|theme| {
svg::Appearance {
fill: Some(theme.palette().text),
color: Some(theme.palette().text),
}
}))
.width(Length::Units(24))
@ -228,7 +223,7 @@ impl Application for CosmicBatteryApplet {
icon("display-brightness-symbolic", 24)
.style(Svg::Custom(|theme| {
svg::Appearance {
fill: Some(theme.palette().text),
color: Some(theme.palette().text),
}
}))
.width(Length::Units(24))
@ -247,7 +242,7 @@ impl Application for CosmicBatteryApplet {
icon("keyboard-brightness-symbolic", 24)
.style(Svg::Custom(|theme| {
svg::Appearance {
fill: Some(theme.palette().text),
color: Some(theme.palette().text),
}
}))
.width(Length::Units(24))
@ -311,7 +306,7 @@ impl Application for CosmicBatteryApplet {
self.theme
}
fn close_requested(&self, _id: iced_sctk::application::SurfaceIdWrapper) -> Self::Message {
fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message {
Message::Ignore
}

View file

@ -12,7 +12,7 @@ use std::{
};
use cosmic::iced;
use iced_sctk::subscription;
use iced::subscription;
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel};
const BACKLIGHT_SYSDIR: &str = "/sys/class/backlight";