chore: update to Rust 2024 edition
This commit is contained in:
parent
c3fafd3910
commit
2b7b4cba56
71 changed files with 254 additions and 292 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -19,11 +19,11 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: 1.80.1
|
||||
toolchain: 1.85.1
|
||||
components: clippy
|
||||
- name: install dependencies
|
||||
run: sudo apt update && sudo apt install -y libxkbcommon-dev libwayland-dev libdbus-1-dev libpulse-dev libinput-dev
|
||||
- uses: actions-rs-plus/clippy-check@v2
|
||||
with:
|
||||
toolchain: 1.80.1
|
||||
toolchain: 1.85.1
|
||||
args: --all --all-targets --all-features
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-app-list"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-app-list-config"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::cosmic_config::{
|
||||
self, cosmic_config_derive::CosmicConfigEntry, Config, CosmicConfigEntry,
|
||||
self, Config, CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Debug;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
use crate::{
|
||||
fl,
|
||||
wayland_subscription::{
|
||||
wayland_subscription, OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage,
|
||||
WaylandRequest, WaylandUpdate,
|
||||
OutputUpdate, ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
||||
wayland_subscription,
|
||||
},
|
||||
};
|
||||
use cctk::{
|
||||
|
|
@ -20,43 +20,41 @@ use cctk::{
|
|||
},
|
||||
};
|
||||
use cosmic::desktop::fde::unicase::Ascii;
|
||||
use cosmic::desktop::fde::{get_languages_from_env, DesktopEntry};
|
||||
use cosmic::desktop::fde::{self, DesktopEntry, get_languages_from_env};
|
||||
use cosmic::{
|
||||
app,
|
||||
Apply, Element, Task, app,
|
||||
applet::{
|
||||
cosmic_panel_config::{PanelAnchor, PanelSize},
|
||||
Context, Size,
|
||||
cosmic_panel_config::{PanelAnchor, PanelSize},
|
||||
},
|
||||
cosmic_config::{Config, CosmicConfigEntry},
|
||||
desktop::IconSourceExt,
|
||||
iced::{
|
||||
self,
|
||||
self, Color, Limits, Subscription,
|
||||
clipboard::mime::{AllowedMimeTypes, AsMimeTypes},
|
||||
event::listen_with,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, mouse_area, row, vertical_rule, vertical_space, Column, Row},
|
||||
window, Color, Limits, Subscription,
|
||||
widget::{Column, Row, column, mouse_area, row, vertical_rule, vertical_space},
|
||||
window,
|
||||
},
|
||||
iced_core::{Border, Padding, Shadow},
|
||||
iced_runtime::{core::event, dnd::peek_dnd},
|
||||
surface,
|
||||
theme::{self, Button, Container},
|
||||
widget::{
|
||||
button, divider, dnd_source, horizontal_space,
|
||||
DndDestination, Image, button, container, divider, dnd_source, horizontal_space,
|
||||
icon::{self, from_name},
|
||||
image::Handle,
|
||||
rectangle_tracker::{rectangle_tracker_subscription, RectangleTracker, RectangleUpdate},
|
||||
svg, text, DndDestination, Image,
|
||||
rectangle_tracker::{RectangleTracker, RectangleUpdate, rectangle_tracker_subscription},
|
||||
svg, text,
|
||||
},
|
||||
Apply, Element, Task,
|
||||
};
|
||||
use cosmic::{desktop::fde, widget};
|
||||
use cosmic_app_list_config::{AppListConfig, APP_ID};
|
||||
use cosmic_app_list_config::{APP_ID, AppListConfig};
|
||||
use cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::State;
|
||||
use futures::future::pending;
|
||||
use iced::{widget::container, Alignment, Background, Length};
|
||||
use iced::{Alignment, Background, Length};
|
||||
use itertools::Itertools;
|
||||
use rand::{rng, Rng};
|
||||
use rand::{Rng, rng};
|
||||
use std::{borrow::Cow, collections::HashMap, path::PathBuf, rc::Rc, str::FromStr, time::Duration};
|
||||
use switcheroo_control::Gpu;
|
||||
use tokio::time::sleep;
|
||||
|
|
@ -905,9 +903,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
Message::DragFinished => {
|
||||
if let Some((_, mut toplevel_group, _, pinned_pos)) = self.dnd_source.take() {
|
||||
if self.dnd_offer.take().is_some() {
|
||||
if let Some((_, ref toplevel_group, _, pinned_pos)) =
|
||||
self.dnd_source.as_ref()
|
||||
{
|
||||
if let Some((_, toplevel_group, _, pinned_pos)) = self.dnd_source.as_ref() {
|
||||
let mut pos = 0;
|
||||
self.pinned_list.retain_mut(|pinned| {
|
||||
let matched_id =
|
||||
|
|
@ -978,7 +974,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
}
|
||||
Message::DndLeave => {
|
||||
let mut cnt = 0;
|
||||
if let Some((_, ref toplevel_group, _, pinned_pos)) = self.dnd_source.as_ref() {
|
||||
if let Some((_, toplevel_group, _, pinned_pos)) = self.dnd_source.as_ref() {
|
||||
let mut pos = 0;
|
||||
self.pinned_list.retain_mut(|pinned| {
|
||||
let matched_id =
|
||||
|
|
@ -1069,7 +1065,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
.iter_mut()
|
||||
.chain(self.pinned_list.iter_mut())
|
||||
{
|
||||
if let Some((_, ref mut handle_img)) = x
|
||||
if let Some((_, handle_img)) = x
|
||||
.toplevels
|
||||
.iter_mut()
|
||||
.find(|(info, _)| info.foreign_toplevel == handle)
|
||||
|
|
@ -1481,11 +1477,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
|
||||
let small_size_threshold = PanelSize::S.get_applet_icon_size_with_padding(false);
|
||||
|
||||
if size <= small_size_threshold {
|
||||
4
|
||||
} else {
|
||||
8
|
||||
}
|
||||
if size <= small_size_threshold { 4 } else { 8 }
|
||||
}
|
||||
};
|
||||
let (favorite_popup_cutoff, active_popup_cutoff) = self.panel_overflow_lengths();
|
||||
|
|
@ -1588,7 +1580,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
// show star indicating pinned_list is drag target
|
||||
favorites.push(
|
||||
container(
|
||||
cosmic::widget::icon::from_name("starred-symbolic.symbolic")
|
||||
icon::from_name("starred-symbolic.symbolic")
|
||||
.size(self.core.applet.suggested_size(false).0),
|
||||
)
|
||||
.padding(self.core.applet.suggested_padding(false))
|
||||
|
|
@ -1728,7 +1720,7 @@ impl cosmic::Application for CosmicAppList {
|
|||
vec![active]
|
||||
} else {
|
||||
vec![
|
||||
cosmic::widget::icon::from_name("com.system76.CosmicAppList")
|
||||
icon::from_name("com.system76.CosmicAppList")
|
||||
.size(self.core.applet.suggested_size(false).0)
|
||||
.into(),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ use cctk::{
|
|||
toplevel_info::{ToplevelInfoHandler, ToplevelInfoState},
|
||||
toplevel_management::{ToplevelManagerHandler, ToplevelManagerState},
|
||||
wayland_client::{
|
||||
Connection, Dispatch, QueueHandle, WEnum,
|
||||
globals::registry_queue_init,
|
||||
protocol::{
|
||||
wl_buffer, wl_output,
|
||||
|
|
@ -37,7 +38,6 @@ use cctk::{
|
|||
wl_shm_pool,
|
||||
wl_surface::WlSurface,
|
||||
},
|
||||
Connection, Dispatch, QueueHandle, WEnum,
|
||||
},
|
||||
wayland_protocols::ext::{
|
||||
foreign_toplevel_list::v1::client::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ use cctk::{
|
|||
},
|
||||
};
|
||||
use cosmic::{
|
||||
iced::{self, stream, Subscription},
|
||||
iced::{self, Subscription, stream},
|
||||
iced_core::image::Bytes,
|
||||
};
|
||||
use image::EncodableLayout;
|
||||
|
||||
use futures::{
|
||||
channel::mpsc::{unbounded, UnboundedReceiver},
|
||||
SinkExt, StreamExt,
|
||||
channel::mpsc::{UnboundedReceiver, unbounded},
|
||||
};
|
||||
use std::fmt::Debug;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
[package]
|
||||
name = "cosmic-applet-a11y"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
# cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings" }
|
||||
cosmic-settings-subscriptions.workspace = true
|
||||
cosmic-settings-subscriptions.default_features = false
|
||||
cosmic-settings-subscriptions.accessibility = true
|
||||
cosmic-settings-subscriptions.cosmic_a11y_manager = true
|
||||
anyhow.workspace = true
|
||||
|
|
|
|||
|
|
@ -7,28 +7,28 @@ use crate::{
|
|||
};
|
||||
use cctk::sctk::reexports::calloop;
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{
|
||||
menu_button, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
},
|
||||
cctk::sctk::reexports::calloop::channel,
|
||||
cosmic_config::{self, CosmicConfigEntry},
|
||||
cosmic_theme::{CosmicPalette, Spacing, ThemeBuilder},
|
||||
iced::{
|
||||
Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
window, Length, Subscription,
|
||||
window,
|
||||
},
|
||||
surface,
|
||||
theme::{self, CosmicTheme},
|
||||
widget::{divider, text, Column},
|
||||
Element, Task,
|
||||
widget::{Column, divider, text},
|
||||
};
|
||||
use cosmic_settings_subscriptions::{
|
||||
accessibility::{self, DBusRequest, DBusUpdate},
|
||||
cosmic_a11y_manager::{AccessibilityEvent, AccessibilityRequest, ColorFilter},
|
||||
};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
use std::sync::LazyLock;
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
use anyhow;
|
||||
use cctk::sctk::reexports::calloop::{self, channel::SyncSender};
|
||||
use cosmic::iced::{
|
||||
self,
|
||||
futures::{self, channel::mpsc, SinkExt, StreamExt},
|
||||
stream, Subscription,
|
||||
self, Subscription,
|
||||
futures::{self, SinkExt, StreamExt, channel::mpsc},
|
||||
stream,
|
||||
};
|
||||
use cosmic_protocols::a11y::v1::client::cosmic_a11y_manager_v1::Filter;
|
||||
use cosmic_settings_subscriptions::cosmic_a11y_manager::{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-audio"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2023 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, CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize, CosmicConfigEntry, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -10,33 +10,29 @@ use std::time::Duration;
|
|||
use crate::{localize::localize, pulse::DeviceInfo};
|
||||
use config::AudioAppletConfig;
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Renderer, Task, Theme, app,
|
||||
applet::{
|
||||
cosmic_panel_config::PanelAnchor,
|
||||
menu_button, menu_control_padding, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
},
|
||||
cctk::sctk::reexports::calloop,
|
||||
cosmic_config::CosmicConfigEntry,
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
self,
|
||||
self, Alignment, Length, Subscription,
|
||||
widget::{self, column, row, slider},
|
||||
window, Alignment, Length, Limits, Subscription,
|
||||
window,
|
||||
},
|
||||
surface, theme,
|
||||
widget::{button, divider, horizontal_space, icon, text, Column, Row},
|
||||
Element, Renderer, Task, Theme,
|
||||
widget::{Column, Row, button, container, divider, horizontal_space, icon, text},
|
||||
};
|
||||
use cosmic_settings_subscriptions::pulse as sub_pulse;
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use iced::{
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::container,
|
||||
};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
use iced::platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup};
|
||||
use libpulse_binding::volume::Volume;
|
||||
use mpris2_zbus::player::PlaybackStatus;
|
||||
use mpris_subscription::{MprisRequest, MprisUpdate};
|
||||
use mpris2_zbus::player::PlaybackStatus;
|
||||
|
||||
mod config;
|
||||
mod mpris_subscription;
|
||||
|
|
@ -342,7 +338,7 @@ impl cosmic::Application for Audio {
|
|||
self.popup.replace(new_id);
|
||||
self.timeline = Timeline::new();
|
||||
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
None,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ use cosmic::iced::Vector;
|
|||
use cosmic::iced_renderer::core::Point;
|
||||
|
||||
use cosmic::iced_core::{
|
||||
Clipboard, Element, Layout, Length, Rectangle, Shell, Size, Widget,
|
||||
event::{self, Event},
|
||||
layout, mouse, overlay, renderer, touch,
|
||||
widget::{tree, Operation, Tree},
|
||||
Clipboard, Element, Layout, Length, Rectangle, Shell, Size, Widget,
|
||||
widget::{Operation, Tree, tree},
|
||||
};
|
||||
|
||||
/// Emit messages on mouse events.
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
use std::{borrow::Cow, fmt::Debug, hash::Hash, path::PathBuf};
|
||||
|
||||
use cosmic::{
|
||||
iced::{self, stream, Subscription},
|
||||
iced_futures::futures::{self, future::OptionFuture, SinkExt, StreamExt},
|
||||
iced::{self, Subscription, stream},
|
||||
iced_futures::futures::{self, SinkExt, StreamExt, future::OptionFuture},
|
||||
};
|
||||
use mpris2_zbus::{
|
||||
enumerator,
|
||||
|
|
@ -15,8 +15,8 @@ use mpris2_zbus::{
|
|||
use tokio::join;
|
||||
use urlencoding::decode;
|
||||
use zbus::{
|
||||
names::{BusName, OwnedBusName},
|
||||
Connection,
|
||||
names::{BusName, OwnedBusName},
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ use std::{cell::RefCell, mem, rc::Rc, sync::LazyLock, thread, time::Duration};
|
|||
extern crate libpulse_binding as pulse;
|
||||
|
||||
use cosmic::{
|
||||
iced::{self, stream, Subscription},
|
||||
iced::{self, Subscription, stream},
|
||||
iced_futures::futures::{self, SinkExt},
|
||||
};
|
||||
|
||||
use libpulse_binding::{
|
||||
callbacks::ListResult,
|
||||
context::{
|
||||
introspect::{Introspector, SinkInfo, SourceInfo},
|
||||
Context,
|
||||
introspect::{Introspector, SinkInfo, SourceInfo},
|
||||
},
|
||||
error::PAErr,
|
||||
mainloop::standard::{IterateResult, Mainloop},
|
||||
|
|
@ -22,7 +22,7 @@ use libpulse_binding::{
|
|||
volume::ChannelVolumes,
|
||||
};
|
||||
|
||||
use tokio::sync::{mpsc, Mutex};
|
||||
use tokio::sync::{Mutex, mpsc};
|
||||
|
||||
pub static FROM_PULSE: LazyLock<Mutex<Option<(mpsc::Receiver<Message>, mpsc::Sender<Message>)>>> =
|
||||
LazyLock::new(|| Mutex::new(None));
|
||||
|
|
@ -508,22 +508,22 @@ impl PulseServer {
|
|||
match self.mainloop.borrow_mut().iterate(false) {
|
||||
IterateResult::Success(_) => {}
|
||||
IterateResult::Err(e) => {
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Err(e)))
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Err(e)));
|
||||
}
|
||||
IterateResult::Quit(e) => {
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Quit(e)))
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Quit(e)));
|
||||
}
|
||||
}
|
||||
|
||||
match self.context.borrow().get_state() {
|
||||
pulse::context::State::Ready => break,
|
||||
pulse::context::State::Failed => {
|
||||
return Err(PulseServerError::ContextErr(pulse::context::State::Failed))
|
||||
return Err(PulseServerError::ContextErr(pulse::context::State::Failed));
|
||||
}
|
||||
pulse::context::State::Terminated => {
|
||||
return Err(PulseServerError::ContextErr(
|
||||
pulse::context::State::Terminated,
|
||||
))
|
||||
));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
@ -757,10 +757,10 @@ impl PulseServer {
|
|||
loop {
|
||||
match self.mainloop.borrow_mut().iterate(false) {
|
||||
IterateResult::Err(e) => {
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Err(e)))
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Err(e)));
|
||||
}
|
||||
IterateResult::Quit(e) => {
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Quit(e)))
|
||||
return Err(PulseServerError::IterateErr(IterateResult::Quit(e)));
|
||||
}
|
||||
IterateResult::Success(_) => {}
|
||||
}
|
||||
|
|
@ -770,7 +770,7 @@ impl PulseServer {
|
|||
pulse::operation::State::Cancelled => {
|
||||
return Err(PulseServerError::OperationErr(
|
||||
pulse::operation::State::Cancelled,
|
||||
))
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-battery"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -3,43 +3,42 @@
|
|||
|
||||
use crate::{
|
||||
backend::{
|
||||
get_charging_limit, power_profile_subscription, set_charging_limit, Power,
|
||||
PowerProfileRequest, PowerProfileUpdate,
|
||||
Power, PowerProfileRequest, PowerProfileUpdate, get_charging_limit,
|
||||
power_profile_subscription, set_charging_limit,
|
||||
},
|
||||
config,
|
||||
dgpu::{dgpu_subscription, Entry, GpuUpdate},
|
||||
dgpu::{Entry, GpuUpdate, dgpu_subscription},
|
||||
fl,
|
||||
};
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{
|
||||
cosmic_panel_config::PanelAnchor,
|
||||
menu_button, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
},
|
||||
cctk::sctk::reexports::calloop,
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, container, row, slider},
|
||||
window, Length, Subscription,
|
||||
widget::{Column, Row, column, container, row},
|
||||
window,
|
||||
},
|
||||
iced_core::{Alignment, Background, Border, Color, Shadow},
|
||||
iced_widget::{Column, Row},
|
||||
surface, theme,
|
||||
widget::{divider, horizontal_space, icon, scrollable, text, vertical_space},
|
||||
Element, Task,
|
||||
widget::{divider, horizontal_space, icon, scrollable, slider, text, vertical_space},
|
||||
};
|
||||
use cosmic_settings_subscriptions::{
|
||||
settings_daemon,
|
||||
upower::{
|
||||
device::{device_subscription, DeviceDbusEvent},
|
||||
device::{DeviceDbusEvent, device_subscription},
|
||||
kbdbacklight::{
|
||||
kbd_backlight_subscription, KeyboardBacklightRequest, KeyboardBacklightUpdate,
|
||||
KeyboardBacklightRequest, KeyboardBacklightUpdate, kbd_backlight_subscription,
|
||||
},
|
||||
},
|
||||
};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
|
||||
use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration};
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
iced::{self, futures::SinkExt, Subscription},
|
||||
iced::{self, Subscription, futures::SinkExt},
|
||||
iced_futures::stream,
|
||||
};
|
||||
use std::{fmt::Debug, hash::Hash};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-bluetooth"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,35 +1,34 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use crate::bluetooth::{set_tick, BluerDeviceStatus, BluerRequest, BluerState, DeviceProperty};
|
||||
use crate::bluetooth::{BluerDeviceStatus, BluerRequest, BluerState, set_tick};
|
||||
use cosmic::{
|
||||
app,
|
||||
applet::token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
applet::token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
cctk::sctk::reexports::calloop,
|
||||
surface,
|
||||
};
|
||||
|
||||
use cosmic::{
|
||||
Element, Task,
|
||||
applet::{menu_button, padded_control},
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
self,
|
||||
self, Alignment, Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, container, row, scrollable, Column},
|
||||
Alignment, Length, Subscription,
|
||||
widget::{Column, column, container, row},
|
||||
},
|
||||
iced_runtime::core::{layout::Limits, window},
|
||||
iced_runtime::core::window,
|
||||
theme,
|
||||
widget::{button, divider, icon, text},
|
||||
Element, Task,
|
||||
widget::{button, divider, icon, scrollable, text},
|
||||
};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
use futures::FutureExt;
|
||||
use std::{collections::HashMap, sync::LazyLock, time::Duration};
|
||||
use tokio::sync::mpsc::Sender;
|
||||
|
||||
use crate::{
|
||||
bluetooth::{bluetooth_subscription, BluerDevice, BluerEvent},
|
||||
bluetooth::{BluerDevice, BluerEvent, bluetooth_subscription},
|
||||
config, fl,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,28 +10,26 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
|
||||
pub use bluer::DeviceProperty;
|
||||
use bluer::{
|
||||
agent::{Agent, AgentHandle},
|
||||
Adapter, Address, Session, Uuid,
|
||||
agent::{Agent, AgentHandle},
|
||||
};
|
||||
|
||||
use cosmic::{
|
||||
iced::{
|
||||
self,
|
||||
self, Subscription,
|
||||
futures::{SinkExt, StreamExt},
|
||||
Subscription,
|
||||
},
|
||||
iced_futures::stream,
|
||||
};
|
||||
|
||||
use futures::{stream::FuturesUnordered, FutureExt};
|
||||
use futures::{FutureExt, stream::FuturesUnordered};
|
||||
use rand::Rng;
|
||||
use tokio::{
|
||||
spawn,
|
||||
sync::{
|
||||
mpsc::{channel, Receiver, Sender},
|
||||
Mutex, RwLock,
|
||||
mpsc::{Receiver, Sender, channel},
|
||||
},
|
||||
task::JoinHandle,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-input-sources"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ use cosmic::{
|
|||
cosmic_config::{self, ConfigSet, CosmicConfigEntry},
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
Task,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, row},
|
||||
window::Id,
|
||||
Limits, Task,
|
||||
},
|
||||
iced_futures::Subscription,
|
||||
iced_runtime::{core::window, Appearance},
|
||||
iced_runtime::{Appearance, core::window},
|
||||
prelude::*,
|
||||
surface, theme,
|
||||
widget::{self, horizontal_space, vertical_space},
|
||||
|
|
@ -135,7 +135,7 @@ impl cosmic::Application for Window {
|
|||
} else {
|
||||
let new_id = Id::unique();
|
||||
self.popup.replace(new_id);
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
None,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
|
||||
use rust_embed::RustEmbed;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-minimize"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use std::borrow::Cow;
|
|||
|
||||
use crate::localize::localize;
|
||||
use cosmic::{
|
||||
app,
|
||||
Task, app,
|
||||
applet::cosmic_panel_config::PanelAnchor,
|
||||
cctk::{
|
||||
sctk::reexports::calloop, toplevel_info::ToplevelInfo,
|
||||
|
|
@ -18,21 +18,19 @@ use cosmic::{
|
|||
},
|
||||
desktop::fde,
|
||||
iced::{
|
||||
self,
|
||||
self, Length, Limits, Subscription,
|
||||
id::Id as WidgetId,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::text,
|
||||
window::{self},
|
||||
Length, Limits, Subscription,
|
||||
},
|
||||
surface,
|
||||
widget::{autosize::autosize, mouse_area},
|
||||
Task,
|
||||
};
|
||||
|
||||
use cosmic::iced_widget::{Column, Row};
|
||||
|
||||
use cosmic::{widget::tooltip, Element};
|
||||
use cosmic::{Element, widget::tooltip};
|
||||
use std::sync::LazyLock;
|
||||
use wayland_subscription::{
|
||||
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use cctk::{
|
|||
},
|
||||
toplevel_info::{ToplevelInfoHandler, ToplevelInfoState},
|
||||
toplevel_management::{ToplevelManagerHandler, ToplevelManagerState},
|
||||
wayland_client::{self, protocol::wl_seat::WlSeat, WEnum},
|
||||
wayland_client::{self, WEnum, protocol::wl_seat::WlSeat},
|
||||
};
|
||||
use cosmic::{
|
||||
cctk::{
|
||||
|
|
@ -35,12 +35,12 @@ use cosmic::{
|
|||
},
|
||||
sctk::shm::{Shm, ShmHandler},
|
||||
wayland_client::{
|
||||
Dispatch,
|
||||
protocol::{
|
||||
wl_buffer,
|
||||
wl_shm::{self, WlShm},
|
||||
wl_shm_pool,
|
||||
},
|
||||
Dispatch,
|
||||
},
|
||||
wayland_protocols::ext::foreign_toplevel_list::v1::client::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
|
||||
},
|
||||
|
|
@ -50,9 +50,9 @@ use cosmic_protocols::{
|
|||
toplevel_info::v1::client::zcosmic_toplevel_handle_v1,
|
||||
toplevel_management::v1::client::zcosmic_toplevel_manager_v1,
|
||||
};
|
||||
use futures::{channel::mpsc, SinkExt};
|
||||
use futures::{SinkExt, channel::mpsc};
|
||||
use sctk::registry::{ProvidesRegistryState, RegistryState};
|
||||
use wayland_client::{globals::registry_queue_init, Connection, QueueHandle};
|
||||
use wayland_client::{Connection, QueueHandle, globals::registry_queue_init};
|
||||
|
||||
#[derive(Default)]
|
||||
struct SessionInner {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
desktop::{fde, IconSourceExt},
|
||||
iced::Limits,
|
||||
iced_core::{layout, overlay, widget::Tree, Border, Layout, Length, Size, Vector},
|
||||
theme::{Button, Container},
|
||||
widget::{button, container, image::Handle, Image, Widget},
|
||||
Element,
|
||||
desktop::{IconSourceExt, fde},
|
||||
iced::Limits,
|
||||
iced_core::{Border, Layout, Length, Size, Vector, layout, overlay, widget::Tree},
|
||||
theme::{Button, Container},
|
||||
widget::{Image, Widget, button, container, image::Handle},
|
||||
};
|
||||
|
||||
use crate::wayland_subscription::WaylandImage;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-network"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -2,32 +2,30 @@ use std::collections::HashSet;
|
|||
use std::sync::LazyLock;
|
||||
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{
|
||||
menu_button, menu_control_padding, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
},
|
||||
cctk::sctk::reexports::calloop,
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
Alignment, Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, row},
|
||||
Alignment, Length, Subscription,
|
||||
},
|
||||
iced_runtime::core::{layout::Limits, window},
|
||||
iced_widget::Row,
|
||||
iced_runtime::core::window,
|
||||
surface, theme,
|
||||
widget::{
|
||||
button, container, divider,
|
||||
Column, Row, button, container, divider,
|
||||
icon::{self, from_name},
|
||||
scrollable, text, text_input, Column,
|
||||
scrollable, text, text_input,
|
||||
},
|
||||
Element, Task,
|
||||
};
|
||||
use cosmic_dbus_networkmanager::interface::enums::{
|
||||
ActiveConnectionState, DeviceState, NmConnectivityState,
|
||||
};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
|
||||
use futures::channel::mpsc::UnboundedSender;
|
||||
use zbus::Connection;
|
||||
|
|
@ -35,6 +33,7 @@ use zbus::Connection;
|
|||
use crate::{
|
||||
config, fl,
|
||||
network_manager::{
|
||||
NetworkManagerEvent, NetworkManagerRequest, NetworkManagerState,
|
||||
active_conns::active_conns_subscription,
|
||||
available_wifi::{AccessPoint, NetworkType},
|
||||
current_networks::ActiveConnectionInfo,
|
||||
|
|
@ -42,7 +41,6 @@ use crate::{
|
|||
hw_address::HwAddress,
|
||||
network_manager_subscription,
|
||||
wireless_enabled::wireless_enabled_subscription,
|
||||
NetworkManagerEvent, NetworkManagerRequest, NetworkManagerState,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -290,7 +288,7 @@ impl cosmic::Application for CosmicNetworkApplet {
|
|||
self.popup.replace(new_id);
|
||||
self.timeline = Timeline::new();
|
||||
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
None,
|
||||
|
|
@ -759,12 +757,14 @@ impl cosmic::Application for CosmicNetworkApplet {
|
|||
}
|
||||
|
||||
known_wifi.push(Element::from(
|
||||
column![menu_button(
|
||||
Row::with_children(btn_content)
|
||||
.align_y(Alignment::Center)
|
||||
.spacing(8)
|
||||
)
|
||||
.on_press(Message::Disconnect(name.clone(), *hw_address))]
|
||||
column![
|
||||
menu_button(
|
||||
Row::with_children(btn_content)
|
||||
.align_y(Alignment::Center)
|
||||
.spacing(8)
|
||||
)
|
||||
.on_press(Message::Disconnect(name.clone(), *hw_address))
|
||||
]
|
||||
.align_x(Alignment::Center),
|
||||
));
|
||||
}
|
||||
|
|
@ -871,12 +871,14 @@ impl cosmic::Application for CosmicNetworkApplet {
|
|||
.active_conns
|
||||
.iter()
|
||||
.any(|conn| conn.hw_address() == hw_device);
|
||||
let mut btn_content = vec![column![
|
||||
text::body(display_name),
|
||||
Column::with_children(vec![text("Adapter").size(10).into()])
|
||||
]
|
||||
.width(Length::Fill)
|
||||
.into()];
|
||||
let mut btn_content = vec![
|
||||
column![
|
||||
text::body(display_name),
|
||||
Column::with_children(vec![text("Adapter").size(10).into()])
|
||||
]
|
||||
.width(Length::Fill)
|
||||
.into(),
|
||||
];
|
||||
if is_connected {
|
||||
btn_content.push(
|
||||
text::body(fl!("connected"))
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// SPDX-License-Identifier: MPL-2.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use super::{NetworkManagerEvent, NetworkManagerState};
|
||||
use cosmic::iced::{self, stream, Subscription};
|
||||
use cosmic::iced::{self, Subscription, stream};
|
||||
use cosmic_dbus_networkmanager::nm::NetworkManager;
|
||||
use futures::{SinkExt, StreamExt};
|
||||
use std::{fmt::Debug, hash::Hash};
|
||||
|
|
|
|||
|
|
@ -20,22 +20,22 @@ use cosmic_dbus_networkmanager::{
|
|||
enums::{self, ActiveConnectionState, DeviceType, NmConnectivityState},
|
||||
},
|
||||
nm::NetworkManager,
|
||||
settings::{connection::Settings, NetworkManagerSettings},
|
||||
settings::{NetworkManagerSettings, connection::Settings},
|
||||
};
|
||||
use futures::{
|
||||
channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender},
|
||||
SinkExt, StreamExt,
|
||||
channel::mpsc::{UnboundedReceiver, UnboundedSender, unbounded},
|
||||
};
|
||||
use hw_address::HwAddress;
|
||||
use tokio::process::Command;
|
||||
use zbus::{
|
||||
zvariant::{self, Value},
|
||||
Connection,
|
||||
zvariant::{self, Value},
|
||||
};
|
||||
|
||||
use self::{
|
||||
available_wifi::{handle_wireless_device, AccessPoint},
|
||||
current_networks::{active_connections, ActiveConnectionInfo},
|
||||
available_wifi::{AccessPoint, handle_wireless_device},
|
||||
current_networks::{ActiveConnectionInfo, active_connections},
|
||||
};
|
||||
|
||||
// In some distros, rfkill is only in sbin, which isn't normally in PATH
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-notifications"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
@ -13,7 +13,7 @@ cosmic-notifications-util = { git = "https://github.com/pop-os/cosmic-notificati
|
|||
cosmic-notifications-config = { git = "https://github.com/pop-os/cosmic-notifications" }
|
||||
# cosmic-notifications-util = { path = "../../cosmic-notifications-daemon/cosmic-notifications-util" }
|
||||
# cosmic-notifications-config = { path = "../../cosmic-notifications-daemon/cosmic-notifications-config" }
|
||||
futures-util = { version = "0.3", feature = ["sink", "stream"] }
|
||||
futures-util = { version = "0.3", features = ["sink"] }
|
||||
tracing = "0.1"
|
||||
ron = "0.8"
|
||||
sendfd = { version = "0.4", features = ["tokio"] }
|
||||
|
|
|
|||
|
|
@ -4,30 +4,29 @@
|
|||
mod localize;
|
||||
mod subscriptions;
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{
|
||||
menu_control_padding, padded_control,
|
||||
token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
},
|
||||
cctk::sctk::reexports::calloop,
|
||||
cosmic_config::{Config, CosmicConfigEntry},
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
Alignment, Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, row},
|
||||
window, Alignment, Length, Limits, Subscription,
|
||||
window,
|
||||
},
|
||||
iced_widget::{scrollable, Column},
|
||||
surface, theme,
|
||||
widget::{button, container, divider, icon, text},
|
||||
Element, Task,
|
||||
widget::{Column, button, container, divider, icon, scrollable, text},
|
||||
};
|
||||
|
||||
use cosmic::iced_futures::futures::executor::block_on;
|
||||
|
||||
use cosmic_notifications_config::NotificationsConfig;
|
||||
use cosmic_notifications_util::{ActionId, Image, Notification};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
use cosmic_time::{Instant, Timeline, anim, chain, id};
|
||||
use std::{borrow::Cow, collections::HashMap, path::PathBuf, sync::LazyLock};
|
||||
use subscriptions::notifications::{self, NotificationsAppletProxy};
|
||||
use tokio::sync::mpsc::Sender;
|
||||
|
|
@ -185,7 +184,7 @@ impl cosmic::Application for Notifications {
|
|||
self.popup.replace(new_id);
|
||||
self.timeline = Timeline::new();
|
||||
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
None,
|
||||
|
|
@ -411,26 +410,30 @@ impl cosmic::Application for Notifications {
|
|||
space_xxs, space_s, ..
|
||||
} = theme::active().cosmic().spacing;
|
||||
|
||||
let do_not_disturb = padded_control(row![anim!(
|
||||
DO_NOT_DISTURB,
|
||||
&self.timeline,
|
||||
fl!("do-not-disturb"),
|
||||
self.config.do_not_disturb,
|
||||
Message::DoNotDisturb
|
||||
)
|
||||
.text_size(14)
|
||||
.width(Length::Fill)]);
|
||||
let do_not_disturb = padded_control(row![
|
||||
anim!(
|
||||
DO_NOT_DISTURB,
|
||||
&self.timeline,
|
||||
fl!("do-not-disturb"),
|
||||
self.config.do_not_disturb,
|
||||
Message::DoNotDisturb
|
||||
)
|
||||
.text_size(14)
|
||||
.width(Length::Fill)
|
||||
]);
|
||||
|
||||
let notifications = if self.cards.is_empty() {
|
||||
let no_notifications = String::from(fl!("no-notifications"));
|
||||
row![container(
|
||||
column![
|
||||
text_icon("cosmic-applet-notification-symbolic", 40),
|
||||
text::body(no_notifications)
|
||||
]
|
||||
.align_x(Alignment::Center)
|
||||
)
|
||||
.center_x(Length::Fill)]
|
||||
row![
|
||||
container(
|
||||
column![
|
||||
text_icon("cosmic-applet-notification-symbolic", 40),
|
||||
text::body(no_notifications)
|
||||
]
|
||||
.align_x(Alignment::Center)
|
||||
)
|
||||
.center_x(Length::Fill)
|
||||
]
|
||||
.padding([8, 0])
|
||||
.spacing(12)
|
||||
} else {
|
||||
|
|
@ -581,12 +584,14 @@ impl cosmic::Application for Notifications {
|
|||
notifs.push(card_list.into());
|
||||
}
|
||||
|
||||
row!(scrollable(
|
||||
Column::with_children(notifs)
|
||||
.spacing(8)
|
||||
.height(Length::Shrink),
|
||||
row!(
|
||||
scrollable(
|
||||
Column::with_children(notifs)
|
||||
.spacing(8)
|
||||
.height(Length::Shrink),
|
||||
)
|
||||
.height(Length::Shrink)
|
||||
)
|
||||
.height(Length::Shrink))
|
||||
.padding(menu_control_padding())
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
use crate::subscriptions::freedesktop_proxy::NotificationsProxy;
|
||||
use cosmic::{
|
||||
iced::futures::{self, SinkExt},
|
||||
iced_futures::{stream, Subscription},
|
||||
iced_futures::{Subscription, stream},
|
||||
};
|
||||
use futures_util::StreamExt;
|
||||
use tokio::sync::mpsc::{channel, Receiver, Sender};
|
||||
use tokio::sync::mpsc::{Receiver, Sender, channel};
|
||||
use tracing::{error, warn};
|
||||
use zbus::Connection;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ use cosmic_notifications_util::Notification;
|
|||
use futures_util::{SinkExt, StreamExt};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
future::pending,
|
||||
os::unix::io::{FromRawFd, RawFd},
|
||||
pin::pin,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-power"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,26 +1,18 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use std::cell::LazyCell;
|
||||
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{menu_button, padded_control},
|
||||
cctk::wayland_protocols::xdg::shell::client::xdg_positioner::Gravity,
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
self,
|
||||
platform_specific::{
|
||||
runtime::wayland::subsurface,
|
||||
shell::commands::popup::{destroy_popup, get_popup},
|
||||
},
|
||||
self, Alignment, Length,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{self, column, row},
|
||||
window, Alignment, Length,
|
||||
window,
|
||||
},
|
||||
iced_runtime::core::layout::Limits,
|
||||
surface, theme,
|
||||
widget::{autosize, button, divider, icon, layer_container::layer_container, text, Space},
|
||||
Element, Task,
|
||||
widget::{Space, button, divider, icon, text},
|
||||
};
|
||||
use std::sync::LazyLock;
|
||||
|
||||
|
|
@ -126,7 +118,7 @@ impl cosmic::Application for Power {
|
|||
let new_id = window::Id::unique();
|
||||
self.popup.replace(new_id);
|
||||
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
None,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-status-area"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -2,22 +2,19 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::cosmic_panel_config::PanelAnchor,
|
||||
applet::token::subscription::{activation_token_subscription, TokenRequest, TokenUpdate},
|
||||
applet::token::subscription::{TokenRequest, TokenUpdate, activation_token_subscription},
|
||||
cctk::sctk::reexports::calloop,
|
||||
iced::{
|
||||
self,
|
||||
overlay::menu,
|
||||
self, Subscription,
|
||||
platform_specific::shell::commands::popup::{destroy_popup, get_popup},
|
||||
window, Limits, Padding, Subscription,
|
||||
window,
|
||||
},
|
||||
surface,
|
||||
widget::{container, mouse_area},
|
||||
Element, Task,
|
||||
};
|
||||
use std::collections::BTreeMap;
|
||||
use zbus::connection::socket::channel;
|
||||
|
||||
use crate::{components::status_menu, subscriptions::status_notifier_watcher};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,11 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
applet::{
|
||||
menu_button,
|
||||
token::{self, subscription::TokenRequest},
|
||||
},
|
||||
Application,
|
||||
applet::{menu_button, token::subscription::TokenRequest},
|
||||
cctk::sctk::reexports::calloop,
|
||||
iced,
|
||||
widget::icon,
|
||||
Application,
|
||||
};
|
||||
|
||||
use crate::subscriptions::status_notifier_item::{IconUpdate, Layout, StatusNotifierItem};
|
||||
|
|
@ -75,7 +72,7 @@ impl State {
|
|||
.map(|mut i| {
|
||||
if i.width <= 0 || i.height <= 0 || i.bytes.is_empty() {
|
||||
// App sent invalid icon data during initialization - show placeholder until NewIcon signal
|
||||
eprintln!("Skipping invalid icon: {}x{} with {} bytes, app may still be initializing",
|
||||
eprintln!("Skipping invalid icon: {}x{} with {} bytes, app may still be initializing",
|
||||
i.width, i.height, i.bytes.len());
|
||||
return icon::from_name("dialog-question").symbolic(true).handle();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::{
|
||||
iced::{self, Subscription},
|
||||
widget::icon,
|
||||
};
|
||||
use cosmic::iced::{self, Subscription};
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use std::collections::HashMap;
|
||||
use zbus::zvariant::{self, OwnedValue};
|
||||
|
|
@ -255,7 +252,7 @@ pub trait DBusMenu {
|
|||
) -> zbus::Result<(u32, Layout)>;
|
||||
|
||||
fn event(&self, id: i32, event_id: &str, data: &OwnedValue, timestamp: u32)
|
||||
-> zbus::Result<()>;
|
||||
-> zbus::Result<()>;
|
||||
|
||||
fn about_to_show(&self, id: i32) -> zbus::Result<bool>;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// TODO: Both this and server proxy could emit same events, have way to generate stream from either?
|
||||
|
||||
use cosmic::iced::{self, Subscription};
|
||||
use futures::{stream, StreamExt};
|
||||
use futures::{StreamExt, stream};
|
||||
|
||||
use crate::subscriptions::status_notifier_item::StatusNotifierItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
|
||||
use futures::prelude::*;
|
||||
use zbus::{
|
||||
Result,
|
||||
fdo::{DBusProxy, RequestNameFlags, RequestNameReply},
|
||||
message::Header,
|
||||
names::{BusName, UniqueName, WellKnownName},
|
||||
object_server::SignalEmitter,
|
||||
Result,
|
||||
};
|
||||
|
||||
const NAME: WellKnownName =
|
||||
|
|
@ -65,7 +65,7 @@ impl StatusNotifierWatcher {
|
|||
|
||||
#[zbus(signal)]
|
||||
async fn status_notifier_item_registered(ctxt: &SignalEmitter<'_>, service: &str)
|
||||
-> Result<()>;
|
||||
-> Result<()>;
|
||||
|
||||
#[zbus(signal)]
|
||||
async fn status_notifier_item_unregistered(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-tiling"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use cctk::{
|
|||
};
|
||||
use cosmic::iced::futures;
|
||||
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
|
||||
use futures::{channel::mpsc, executor::block_on, SinkExt};
|
||||
use futures::{SinkExt, channel::mpsc, executor::block_on};
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
os::{
|
||||
|
|
@ -29,9 +29,9 @@ use std::{
|
|||
};
|
||||
use tracing::error;
|
||||
use wayland_client::{
|
||||
Connection, QueueHandle,
|
||||
globals::registry_queue_init,
|
||||
protocol::wl_output::{self, WlOutput},
|
||||
Connection, QueueHandle,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
use crate::wayland::{self, AppRequest};
|
||||
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
||||
use cosmic::iced::{
|
||||
self,
|
||||
futures::{self, channel::mpsc, SinkExt, StreamExt},
|
||||
stream, Subscription,
|
||||
self, Subscription,
|
||||
futures::{self, SinkExt, StreamExt, channel::mpsc},
|
||||
stream,
|
||||
};
|
||||
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ use crate::{
|
|||
};
|
||||
use cctk::sctk::reexports::calloop::channel::SyncSender;
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
app::Core,
|
||||
applet::{menu_button, padded_control},
|
||||
cosmic_config::{Config, ConfigSet, CosmicConfigEntry},
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
Length, Subscription,
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
window::Id,
|
||||
Length, Limits, Subscription,
|
||||
},
|
||||
iced_widget::{column, row},
|
||||
surface, theme,
|
||||
|
|
@ -23,11 +23,10 @@ use cosmic::{
|
|||
segmented_button::{self, Entity, SingleSelectModel},
|
||||
segmented_control, text,
|
||||
},
|
||||
Element, Task,
|
||||
};
|
||||
use cosmic_comp_config::{CosmicCompConfig, TileBehavior};
|
||||
use cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::TilingState;
|
||||
use cosmic_time::{anim, chain, id, Timeline};
|
||||
use cosmic_time::{Timeline, anim, chain, id};
|
||||
use std::{thread, time::Instant};
|
||||
use tracing::error;
|
||||
|
||||
|
|
@ -173,7 +172,7 @@ impl cosmic::Application for Window {
|
|||
self.active_hint = id::Toggler::unique();
|
||||
let new_id = Id::unique();
|
||||
self.popup = Some(new_id);
|
||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||
let popup_settings = self.core.applet.get_popup_settings(
|
||||
self.core.main_window_id().unwrap(),
|
||||
new_id,
|
||||
Some((1, 1)),
|
||||
|
|
@ -182,7 +181,7 @@ impl cosmic::Application for Window {
|
|||
);
|
||||
|
||||
get_popup(popup_settings)
|
||||
}
|
||||
};
|
||||
}
|
||||
Message::PopupClosed(id) => {
|
||||
if self.popup.as_ref() == Some(&id) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applet-time"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -7,23 +7,23 @@ use chrono::{Datelike, Timelike};
|
|||
use cosmic::iced_futures::stream;
|
||||
use cosmic::widget::Id;
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, app,
|
||||
applet::{cosmic_panel_config::PanelAnchor, menu_button, padded_control},
|
||||
cctk::sctk::reexports::calloop,
|
||||
cosmic_theme::Spacing,
|
||||
iced::{
|
||||
futures::{channel::mpsc, SinkExt, StreamExt, TryFutureExt},
|
||||
Alignment, Length, Rectangle, Subscription,
|
||||
futures::{SinkExt, StreamExt, TryFutureExt, channel::mpsc},
|
||||
platform_specific::shell::wayland::commands::popup::{destroy_popup, get_popup},
|
||||
widget::{column, row, vertical_space},
|
||||
window, Alignment, Length, Rectangle, Subscription,
|
||||
window,
|
||||
},
|
||||
iced_widget::{horizontal_rule, Column},
|
||||
iced_widget::{Column, horizontal_rule},
|
||||
surface, theme,
|
||||
widget::{
|
||||
autosize, button, container, divider, grid, horizontal_space, icon, rectangle_tracker::*,
|
||||
text, Button, Grid, Space,
|
||||
Button, Grid, Space, autosize, button, container, divider, grid, horizontal_space, icon,
|
||||
rectangle_tracker::*, text,
|
||||
},
|
||||
Element, Task,
|
||||
};
|
||||
use logind_zbus::manager::ManagerProxy;
|
||||
use std::sync::LazyLock;
|
||||
|
|
@ -33,18 +33,18 @@ use tokio::{sync::watch, time};
|
|||
use icu::{
|
||||
calendar::DateTime,
|
||||
datetime::{
|
||||
DateTimeFormatter, DateTimeFormatterOptions,
|
||||
options::{
|
||||
components::{self, Bag},
|
||||
preferences,
|
||||
},
|
||||
DateTimeFormatter, DateTimeFormatterOptions,
|
||||
},
|
||||
locid::Locale,
|
||||
};
|
||||
|
||||
use crate::{config::TimeAppletConfig, fl, time::get_calender_first};
|
||||
use cosmic::applet::token::subscription::{
|
||||
activation_token_subscription, TokenRequest, TokenUpdate,
|
||||
TokenRequest, TokenUpdate, activation_token_subscription,
|
||||
};
|
||||
|
||||
static AUTOSIZE_MAIN_ID: LazyLock<Id> = LazyLock::new(|| Id::new("autosize-main"));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
name = "cosmic-applet-workspaces"
|
||||
version = "0.1.1"
|
||||
authors = ["Ashley Wulber <ashley@system76.com>"]
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -11,26 +11,24 @@ use cctk::{
|
|||
workspace::Workspace,
|
||||
};
|
||||
use cosmic::{
|
||||
app,
|
||||
Element, Task, Theme, app,
|
||||
applet::cosmic_panel_config::PanelAnchor,
|
||||
iced::{
|
||||
event,
|
||||
mouse::{self, ScrollDelta},
|
||||
widget::{button, column, row},
|
||||
Alignment,
|
||||
Event::Mouse,
|
||||
Length, Limits, Subscription,
|
||||
Length, Limits, Subscription, event,
|
||||
mouse::{self, ScrollDelta},
|
||||
widget::{button, column, row},
|
||||
},
|
||||
iced_core::{Background, Border},
|
||||
surface,
|
||||
widget::{autosize, container, horizontal_space, vertical_space, Id},
|
||||
Element, Task, Theme,
|
||||
widget::{Id, autosize, container, horizontal_space, vertical_space},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
config,
|
||||
wayland::WorkspaceEvent,
|
||||
wayland_subscription::{workspaces, WorkspacesUpdate},
|
||||
wayland_subscription::{WorkspacesUpdate, workspaces},
|
||||
};
|
||||
|
||||
use std::{
|
||||
|
|
@ -187,11 +185,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
|
|||
{
|
||||
let max_w = self.workspaces.len().wrapping_sub(1);
|
||||
let d_i = if self.scroll > 0.0 {
|
||||
if w_i == 0 {
|
||||
max_w
|
||||
} else {
|
||||
w_i.wrapping_sub(1)
|
||||
}
|
||||
if w_i == 0 { max_w } else { w_i.wrapping_sub(1) }
|
||||
} else if w_i == max_w {
|
||||
0
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use i18n_embed::{
|
||||
fluent::{fluent_language_loader, FluentLanguageLoader},
|
||||
DefaultLocalizer, LanguageLoader, Localizer,
|
||||
fluent::{FluentLanguageLoader, fluent_language_loader},
|
||||
};
|
||||
use rust_embed::RustEmbed;
|
||||
use std::sync::LazyLock;
|
||||
|
|
|
|||
|
|
@ -16,15 +16,15 @@ use cctk::{
|
|||
},
|
||||
workspace::{Workspace, WorkspaceHandler, WorkspaceState},
|
||||
};
|
||||
use futures::{channel::mpsc, executor::block_on, SinkExt};
|
||||
use futures::{SinkExt, channel::mpsc, executor::block_on};
|
||||
use std::os::{
|
||||
fd::{FromRawFd, RawFd},
|
||||
unix::net::UnixStream,
|
||||
};
|
||||
use wayland_client::{
|
||||
Connection, QueueHandle,
|
||||
globals::registry_queue_init,
|
||||
protocol::wl_output::{self, WlOutput},
|
||||
Connection, QueueHandle,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
use crate::wayland::{self, WorkspaceEvent};
|
||||
use cctk::{sctk::reexports::calloop::channel::SyncSender, workspace::Workspace};
|
||||
use cosmic::iced::{
|
||||
self,
|
||||
futures::{channel::mpsc, SinkExt, StreamExt},
|
||||
stream, Subscription,
|
||||
self, Subscription,
|
||||
futures::{SinkExt, StreamExt, channel::mpsc},
|
||||
stream,
|
||||
};
|
||||
use std::sync::LazyLock;
|
||||
use tokio::sync::Mutex;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-applets"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-panel-button"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use cosmic_config::{cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry};
|
||||
use cosmic_config::{CosmicConfigEntry, cosmic_config_derive::CosmicConfigEntry};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Clone, CosmicConfigEntry)]
|
||||
|
|
|
|||
|
|
@ -2,18 +2,17 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use config::{CosmicPanelButtonConfig, IndividualConfig, Override};
|
||||
use cosmic::desktop::fde::{self, get_languages_from_env, DesktopEntry};
|
||||
use cosmic::desktop::fde::{self, DesktopEntry, get_languages_from_env};
|
||||
use cosmic::{
|
||||
app,
|
||||
Task, app,
|
||||
applet::{
|
||||
cosmic_panel_config::{PanelAnchor, PanelSize},
|
||||
Size,
|
||||
cosmic_panel_config::{PanelAnchor, PanelSize},
|
||||
},
|
||||
iced::{self, Length},
|
||||
iced_widget::row,
|
||||
surface,
|
||||
widget::{autosize, vertical_space, Id},
|
||||
Task,
|
||||
widget::{Id, autosize, vertical_space},
|
||||
};
|
||||
use cosmic_config::{Config, CosmicConfigEntry};
|
||||
use std::{env, fs, process::Command, sync::LazyLock};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue