From 317de19eb3594b07bd34f6a6043ab914459aa645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:03:32 +0200 Subject: [PATCH 01/11] fix(shortcuts): modified count for accessibility and tiling These weren't being set previously, so they never showed up. Also updates remaining things here to use ListButton. --- Cargo.lock | 36 ++++++++-------- .../pages/input/keyboard/shortcuts/common.rs | 31 +++++--------- .../src/pages/input/keyboard/shortcuts/mod.rs | 42 +++++++------------ cosmic-settings/src/pages/time/date.rs | 2 +- cosmic-settings/src/pages/time/region.rs | 2 +- cosmic-settings/src/widget/mod.rs | 6 ++- 6 files changed, 51 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9205b2..582fce1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1199,7 +1199,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ "serde", "termcolor", - "unicode-width 0.1.14", + "unicode-width 0.2.2", ] [[package]] @@ -1391,7 +1391,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1412,7 +1412,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "quote", "syn 2.0.117", @@ -1827,7 +1827,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "almost", "configparser", @@ -3250,7 +3250,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "dnd", "iced_accessibility", @@ -3271,7 +3271,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "accesskit", "accesskit_winit", @@ -3280,7 +3280,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bitflags 2.11.1", "bytes", @@ -3305,7 +3305,7 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_core", "iced_futures", @@ -3315,7 +3315,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "futures", "iced_core", @@ -3329,7 +3329,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bitflags 2.11.1", "bytemuck", @@ -3350,7 +3350,7 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_graphics", "iced_runtime", @@ -3359,7 +3359,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3371,7 +3371,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3387,7 +3387,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bytemuck", "cosmic-text", @@ -3404,7 +3404,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "as-raw-xcb-connection", "bitflags 2.11.1", @@ -3435,7 +3435,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.2" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3455,7 +3455,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "cosmic-client-toolkit", "cursor-icon", @@ -4567,7 +4567,7 @@ checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libcosmic" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352" +source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "apply", "ashpd 0.12.3", diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs index 70e1952..669c3e7 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs @@ -8,7 +8,7 @@ use cosmic::iced::keyboard::{Key, Location, Modifiers}; use cosmic::iced::platform_specific::shell::wayland::commands::keyboard_shortcuts_inhibit; use cosmic::iced::platform_specific::shell::wayland::keymap; use cosmic::iced::{self, Alignment, Length}; -use cosmic::widget::{self, button, icon, settings, text}; +use cosmic::widget::{self, button, icon, list, settings, text}; use cosmic::{Apply, Element, Task, theme}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::shortcuts::{self, Action, Binding, Shortcuts}; @@ -865,13 +865,11 @@ fn context_drawer<'a>( } /// Display a shortcut as a list item -fn shortcut_item(custom: bool, id: usize, data: &ShortcutModel) -> Element<'_, ShortcutMessage> { - #[derive(Copy, Clone, Debug)] - enum LocalMessage { - Remove, - Show, - } - +fn shortcut_item( + custom: bool, + id: usize, + data: &ShortcutModel, +) -> list::ListButton<'_, ShortcutMessage> { let bindings = data .bindings .iter() @@ -880,7 +878,7 @@ fn shortcut_item(custom: bool, id: usize, data: &ShortcutModel) -> Element<'_, S .map(|(_, shortcut)| text::body(shortcut.binding.to_string()).into()) .collect::>(); - let shortcuts: Element = if bindings.is_empty() { + let shortcuts: Element = if bindings.is_empty() { text::body(fl!("disabled")).into() } else { widget::column::with_children(bindings) @@ -900,7 +898,7 @@ fn shortcut_item(custom: bool, id: usize, data: &ShortcutModel) -> Element<'_, S .push(icon::from_name("go-next-symbolic").size(16)) .push_maybe(custom.then(|| { widget::button::icon(icon::from_name("edit-delete-symbolic")) - .on_press(LocalMessage::Remove) + .on_press(ShortcutMessage::DeleteShortcut(id)) })) .align_y(Alignment::Center) .spacing(8); @@ -909,14 +907,7 @@ fn shortcut_item(custom: bool, id: usize, data: &ShortcutModel) -> Element<'_, S .flex_control(control) .align_items(Alignment::Center) .spacing(16) - .apply(widget::container) - .class(theme::Container::List) - .apply(widget::button::custom) - .class(theme::Button::Transparent) - .on_press(LocalMessage::Show) - .apply(Element::from) - .map(move |message| match message { - LocalMessage::Show => ShortcutMessage::ShowShortcut(id, data.description.clone()), - LocalMessage::Remove => ShortcutMessage::DeleteShortcut(id), - }) + .width(Length::Shrink) + .apply(list::button) + .on_press(ShortcutMessage::ShowShortcut(id, data.description.clone())) } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs index 5a5b1bb..ab60609 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs @@ -15,8 +15,8 @@ pub mod tiling; use cosmic::app::ContextDrawer; use cosmic::iced::Length; -use cosmic::widget::{self, icon, settings, text}; -use cosmic::{Apply, Element, Task, theme}; +use cosmic::widget::{self, list::ListButton, settings, text}; +use cosmic::{Apply, Element, Task}; use cosmic_config::ConfigGet; use cosmic_settings_config::Binding; use cosmic_settings_config::shortcuts::action::{ @@ -222,11 +222,13 @@ impl Page { self.search.localized = SecondaryMap::new(); self.search.input = String::new(); self.search_model.on_clear(); - self.modified.custom = 0; + self.modified.accessibility = 0; self.modified.manage_windows = 0; self.modified.move_windows = 0; self.modified.nav = 0; self.modified.system = 0; + self.modified.window_tiling = 0; + self.modified.custom = 0; } fn reload_search(&mut self) { @@ -497,32 +499,18 @@ fn shortcuts() -> Section { } /// Display a category as a list item -fn category_item(category: Category, name: &str, modified: u16) -> Element<'_, Message> { - let icon = icon::from_name("go-next-symbolic").size(16); - - let control = if modified == 0 { - Element::from(icon) - } else { - widget::row::with_capacity(2) - .push(text::body(fl!("modified", count = modified))) - .push(icon) - .into() - }; - - settings::item::builder(name) - .control(control) - .spacing(16) - .apply(widget::container) - .class(theme::Container::List) - .apply(widget::button::custom) - .class(theme::Button::Transparent) - .width(Length::Fill) - .on_press(Message::Category(category)) - .into() +fn category_item(category: Category, name: &str, modified: u16) -> ListButton<'_, Message> { + crate::widget::go_next_with_item( + name, + (modified > 0).then(|| text::body(fl!("modified", count = modified)).apply(Element::from)), + Message::Category(category), + ) } fn action_category(action: &Action) -> Option { - Some(if manage_windows::actions().contains(action) { + Some(if accessibility::actions().contains(action) { + Category::Accessibility + } else if manage_windows::actions().contains(action) { Category::ManageWindow } else if move_window::actions().contains(action) { Category::MoveWindow @@ -530,6 +518,8 @@ fn action_category(action: &Action) -> Option { Category::Nav } else if system::actions().contains(action) { Category::System + } else if tiling::actions().contains(action) { + Category::WindowTiling } else { return None; }) diff --git a/cosmic-settings/src/pages/time/date.rs b/cosmic-settings/src/pages/time/date.rs index 16cc382..2ff4e67 100644 --- a/cosmic-settings/src/pages/time/date.rs +++ b/cosmic-settings/src/pages/time/date.rs @@ -8,7 +8,7 @@ use cosmic::{ cosmic_config::{self, ConfigGet, ConfigSet}, iced::core::text::Wrapping, surface, - widget::{self, dropdown, list, settings}, + widget::{self, dropdown, settings}, }; use cosmic_settings_page::{self as page, Section, section}; use icu::{ diff --git a/cosmic-settings/src/pages/time/region.rs b/cosmic-settings/src/pages/time/region.rs index 36128f7..8a9be3f 100644 --- a/cosmic-settings/src/pages/time/region.rs +++ b/cosmic-settings/src/pages/time/region.rs @@ -7,7 +7,7 @@ use std::sync::Arc; use crate::widget::selection_context_item; use cosmic::app::{ContextDrawer, context_drawer}; use cosmic::iced::{Alignment, Length}; -use cosmic::widget::{self, button, list}; +use cosmic::widget::{self, button}; use cosmic::{Apply, Element}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_page::Section; diff --git a/cosmic-settings/src/widget/mod.rs b/cosmic-settings/src/widget/mod.rs index a5b8322..5646dc6 100644 --- a/cosmic-settings/src/widget/mod.rs +++ b/cosmic-settings/src/widget/mod.rs @@ -206,8 +206,10 @@ pub fn go_next_with_item<'a, Msg: 'static>( msg_opt: impl Into>, ) -> list::ListButton<'a, Msg> { settings::item_row(vec![ - text::body(description).wrapping(Wrapping::Word).into(), - horizontal().into(), + text::body(description) + .width(Length::Fill) + .wrapping(Wrapping::Word) + .into(), row::with_capacity(2) .push(item) .push(icon::from_name("go-next-symbolic").size(16).icon()) From 26f0fb0609a54393b3e279a24824ffa681ae778b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Fri, 17 Apr 2026 14:26:39 +0200 Subject: [PATCH 02/11] chore(default_apps): reduce code duplication Also fixes the flex items wrapping too early by setting the FlexRow width to Shrink. --- .../src/pages/applications/default_apps.rs | 328 ++++-------------- 1 file changed, 71 insertions(+), 257 deletions(-) diff --git a/cosmic-settings/src/pages/applications/default_apps.rs b/cosmic-settings/src/pages/applications/default_apps.rs index 89b28c0..ee759e3 100644 --- a/cosmic-settings/src/pages/applications/default_apps.rs +++ b/cosmic-settings/src/pages/applications/default_apps.rs @@ -11,7 +11,7 @@ use std::{ use cosmic::{ Apply, Element, Task, - iced::Alignment, + iced::{Alignment, Length}, surface, widget::{self, dropdown, icon, settings}, }; @@ -281,269 +281,83 @@ impl Page { } } +fn app_item(meta: &AppMeta, label: String, category: Category) -> widget::FlexRow<'_, Message> { + // Avoid creating popup_dropdown for empty app lists. + // Empty categories are rendered as non-interactive text to prevent Wayland crashes. + settings::flex_item( + label, + if meta.apps.is_empty() { + widget::text(fl!("default-apps", "not-installed")).apply(Element::from) + } else { + dropdown::popup_dropdown( + &meta.apps, + meta.selected, + move |id| Message::SetDefault(category, id), + cosmic::iced::window::Id::RESERVED, + Message::Surface, + |a| crate::app::Message::PageMessage(crate::pages::Message::DefaultApps(a)), + ) + .icons(Cow::Borrowed(&meta.icons)) + .apply(Element::from) + }, + ) + .align_items(Alignment::Center) + .width(Length::Shrink) +} + fn apps() -> Section { Section::default().view::(move |_binder, page, section| { let Some(mime_apps) = page.mime_apps.as_ref() else { return widget::space().into(); }; - // Avoid creating popup_dropdown for empty app lists. - // Empty categories are rendered as non-interactive text to prevent Wayland crashes. - settings::section() + settings::section::with_capacity(9) .title(§ion.title) - .add({ - let meta = &mime_apps.apps[DROPDOWN_WEB_BROWSER]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "web-browser"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "web-browser"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::WebBrowser, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - .min_item_width(300.0) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_FILE_MANAGER]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "file-manager"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "file-manager"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::FileManager, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_MAIL]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "mail-client"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "mail-client"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Mail, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_MUSIC]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "music"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "music"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Audio, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_VIDEO]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "video"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "video"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Video, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_PHOTO]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "photos"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "photos"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Image, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_CALENDAR]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "calendar"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "calendar"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Calendar, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_TERMINAL]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "terminal"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "terminal"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::Terminal, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) - .add({ - let meta = &mime_apps.apps[DROPDOWN_TEXT_EDITOR]; - if meta.apps.is_empty() { - settings::flex_item( - fl!("default-apps", "text-editor"), - widget::text(fl!("default-apps", "not-installed")), - ) - .align_items(Alignment::Center) - } else { - settings::flex_item( - fl!("default-apps", "text-editor"), - dropdown::popup_dropdown( - &meta.apps, - meta.selected, - |id| Message::SetDefault(Category::TextEditor, id), - cosmic::iced::window::Id::RESERVED, - Message::Surface, - |a| { - crate::app::Message::PageMessage( - crate::pages::Message::DefaultApps(a), - ) - }, - ) - .icons(Cow::Borrowed(&meta.icons)), - ) - .align_items(Alignment::Center) - } - }) + .add(app_item( + &mime_apps.apps[DROPDOWN_WEB_BROWSER], + fl!("default-apps", "web-browser"), + Category::WebBrowser, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_FILE_MANAGER], + fl!("default-apps", "file-manager"), + Category::FileManager, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_MAIL], + fl!("default-apps", "mail-client"), + Category::Mail, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_MUSIC], + fl!("default-apps", "music"), + Category::Audio, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_VIDEO], + fl!("default-apps", "video"), + Category::Video, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_PHOTO], + fl!("default-apps", "photos"), + Category::Image, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_CALENDAR], + fl!("default-apps", "calendar"), + Category::Calendar, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_TERMINAL], + fl!("default-apps", "terminal"), + Category::Terminal, + )) + .add(app_item( + &mime_apps.apps[DROPDOWN_TEXT_EDITOR], + fl!("default-apps", "text-editor"), + Category::TextEditor, + )) .apply(Element::from) .map(crate::pages::Message::DefaultApps) }) From c04e49e218023477069e29c37e28bb01ae709dbd Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sat, 11 Apr 2026 13:40:27 +0200 Subject: [PATCH 03/11] fix(wallpapers): follow symlinks when scanning wallpaper directories On NixOS, /run/current-system/sw/share/backgrounds lists all wallpapers installed on the system. The folder entries are symbolic links to the actual PNG files (each in a dedicated nix store path). Previously WalkDir would skip over these, resulting in cosmic-settings displaying an empty wallpaper list. By following symbolic links, the list is now properly populated. --- pages/wallpapers/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/wallpapers/src/lib.rs b/pages/wallpapers/src/lib.rs index 498b424..921117c 100644 --- a/pages/wallpapers/src/lib.rs +++ b/pages/wallpapers/src/lib.rs @@ -104,6 +104,7 @@ pub async fn load_each_from_path( ) -> Pin>> { let candidate_paths: Vec<_> = WalkDir::new(path) .max_depth(3) + .follow_links(true) .into_iter() .filter_map(Result::ok) .filter(|entry| entry.file_type().is_file()) From 78644a32e3741f8f80e9b8ce65c3550c85f9c1f8 Mon Sep 17 00:00:00 2001 From: Ashley Wulber <48420062+wash2@users.noreply.github.com> Date: Wed, 22 Apr 2026 16:33:37 -0400 Subject: [PATCH 04/11] =?UTF-8?q?Revert=20"Changes=20the=20PageInner.size?= =?UTF-8?q?=20field=20to=20have=20no=20explicit=20default.=E2=80=A6=20(#19?= =?UTF-8?q?77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … It is only initialized (not None) when PageInner.panel_config is initialized. This implementation fails faster and more verbose, when program is in an unintended state." This reverts commit ba5fb65b44302d2aae5d969917d9f3d7b04c8d1e. - [x] I have disclosed use of any AI generated code in my commit messages. - If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR. - In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment. - [x] I understand these changes in full and will be able to respond to review comments. - [x] My change is accurately described in the commit message. - [x] My contribution is tested and working as described. - [x] I have read the [Developer Certificate of Origin](https://developercertificate.org/) and certify my contribution under its conditions. Co-authored-by: Levi Portenier --- .../src/pages/desktop/panel/inner.rs | 22 ++++++------------- .../src/pages/desktop/panel/mod.rs | 2 -- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/cosmic-settings/src/pages/desktop/panel/inner.rs b/cosmic-settings/src/pages/desktop/panel/inner.rs index bcd7bb3..9974e54 100644 --- a/cosmic-settings/src/pages/desktop/panel/inner.rs +++ b/cosmic-settings/src/pages/desktop/panel/inner.rs @@ -22,9 +22,9 @@ use crate::pages::desktop::appearance::Roundness; pub struct PageInner { pub(crate) config_helper: Option, pub(crate) panel_config: Option, - pub size: Option, pub opacity: f32, pub opacity_changing: bool, + pub size: PanelSize, pub outputs: Vec, pub anchors: Vec, pub backgrounds: Vec, @@ -40,9 +40,9 @@ impl Default for PageInner { Self { config_helper: Option::default(), panel_config: Option::default(), - size: Option::default(), opacity: 0.0, opacity_changing: false, + size: PanelSize::M, outputs: vec![fl!("all-displays")], anchors: vec![ Anchor(PanelAnchor::Left).to_string(), @@ -209,9 +209,7 @@ pub(crate) fn style< text::body(fl!("small")).into(), slider( 0..=4, - match inner.size.as_ref().expect( - "PageInner.size is None even though PageInner.panel_config is Some", - ) { + match inner.size { PanelSize::XS => 0, PanelSize::S => 1, PanelSize::M => 2, @@ -506,7 +504,7 @@ impl PageInner { if let Err(err) = default.write_entry(config) { tracing::error!(?err, "Error resetting panel config."); } - self.size = Some(default.size.clone()); + self.size.clone_from(&default.size); self.system_default = Some(default.clone()); self.panel_config.clone_from(&self.system_default); } else { @@ -605,16 +603,10 @@ impl PageInner { _ = panel_config.set_border_radius(helper, new_radius).unwrap(); } Message::PanelSize(size) => { - self.size = Some(size); + self.size = size; } Message::PanelSizeCommit => { - _ = panel_config.set_size( - helper, - self.size - .as_ref() - .expect("PageInner.size is None even though it should be Some, since PageInner.panel_config is Some") - .clone() - ); + _ = panel_config.set_size(helper, self.size.clone()); // Reset any size overrides the user might have set _ = panel_config.set_size_center(helper, None); _ = panel_config.set_size_wings(helper, None); @@ -677,7 +669,7 @@ impl PageInner { } } Message::PanelConfig(c) => { - self.size = Some(c.size.clone()); + self.size = c.size.clone(); self.panel_config = Some(*c); return Task::none(); } diff --git a/cosmic-settings/src/pages/desktop/panel/mod.rs b/cosmic-settings/src/pages/desktop/panel/mod.rs index 7748618..4f98e64 100644 --- a/cosmic-settings/src/pages/desktop/panel/mod.rs +++ b/cosmic-settings/src/pages/desktop/panel/mod.rs @@ -79,7 +79,6 @@ impl Default for Page { // If the config is not present, it will be created with the default values and the name will not match (panel_config.name == "Panel").then_some(panel_config) }); - let size = panel_config.as_ref().map(|c| c.size.clone()); let system_default = cosmic::cosmic_config::Config::system( &format!("{}.Panel", cosmic_panel_config::NAME), CosmicPanelConfig::VERSION, @@ -99,7 +98,6 @@ impl Default for Page { inner: PageInner { config_helper, panel_config, - size, container_config, outputs_map: HashMap::new(), system_default, From 999e2ba4e5f5b2679c0068167c266b572026b00f Mon Sep 17 00:00:00 2001 From: leyoda Date: Thu, 23 Apr 2026 17:33:22 +0200 Subject: [PATCH 05/11] yoda: rebase onto libcosmic-yoda via path deps + macOS controls toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fresh rewiring from upstream master (78644a3) — the previous attempt on 051f4f9 was 137 commits behind and hit API drift (cosmic::iced_futures, Subscription::run_with_id). Upstream master uses the newer API (cosmic::iced::stream + Subscription::run_with) which our libcosmic-yoda already supports. Yoda wiring: - [workspace.dependencies.libcosmic] (git pop-os) -> libcosmic-yoda { path, wayland } - cosmic-config + iced_winit workspace deps -> path to libcosmic-yoda submodule - [patch.pop-os/libcosmic] redirects transitive cosmic-config + cosmic-theme + iced_futures + iced_winit to our local paths so the graph resolves to a single copy (cosmic-bg/comp/idle/panel configs unify cleanly against master) - subscriptions/sound + page + cosmic-settings inner Cargo.toml: libcosmic -> libcosmic-yoda (workspace + direct variants) - winit feature dropped from libcosmic-yoda deps (our fork is Wayland-only) Cherry-picked from leyoda/local/window-controls-position @ 52ce463: - cosmic-settings/src/pages/desktop/window_management.rs — macOS toggle UI - i18n/en + fr/cosmic_settings.ftl — translations Installed at /usr/bin/cosmic-settings (yoda build, 78 MB). Pre-yoda pacman version kept at /usr/bin/cosmic-settings.pre-yoda-fork. --- Cargo.lock | 27 +++------------ Cargo.toml | 34 +++++++++---------- cosmic-settings/Cargo.toml | 14 ++++---- .../src/pages/desktop/window_management.rs | 22 ++++++++++++ i18n/en/cosmic_settings.ftl | 1 + i18n/fr/cosmic_settings.ftl | 1 + page/Cargo.toml | 2 +- subscriptions/sound/Cargo.toml | 2 +- 8 files changed, 54 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 582fce1..5ecab30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1391,7 +1391,6 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1412,7 +1411,6 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "quote", "syn 2.0.117", @@ -1588,7 +1586,7 @@ dependencies = [ "itertools 0.14.0", "itoa", "jiff", - "libcosmic", + "libcosmic-yoda", "locale1", "locales-rs", "mime 0.3.17", @@ -1737,7 +1735,7 @@ version = "1.0.7" dependencies = [ "derive_setters", "downcast-rs 2.0.2", - "libcosmic", + "libcosmic-yoda", "regex", "slab", "slotmap", @@ -1762,7 +1760,7 @@ dependencies = [ "cosmic-pipewire", "futures", "intmap", - "libcosmic", + "libcosmic-yoda", "numtoa", "rustix 1.1.4", "tokio", @@ -1827,7 +1825,6 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "almost", "configparser", @@ -3250,7 +3247,6 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "dnd", "iced_accessibility", @@ -3271,7 +3267,6 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "accesskit", "accesskit_winit", @@ -3280,7 +3275,6 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bitflags 2.11.1", "bytes", @@ -3305,7 +3299,6 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_core", "iced_futures", @@ -3315,7 +3308,6 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "futures", "iced_core", @@ -3329,7 +3321,6 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bitflags 2.11.1", "bytemuck", @@ -3350,7 +3341,6 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_graphics", "iced_runtime", @@ -3359,7 +3349,6 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3371,7 +3360,6 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3387,7 +3375,6 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "bytemuck", "cosmic-text", @@ -3404,7 +3391,6 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "as-raw-xcb-connection", "bitflags 2.11.1", @@ -3435,7 +3421,6 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.2" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3455,7 +3440,6 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" dependencies = [ "cosmic-client-toolkit", "cursor-icon", @@ -4565,9 +4549,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] -name = "libcosmic" -version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#c423ad1bfc25057922406c687f2ddc75ead5ab67" +name = "libcosmic-yoda" +version = "0.1.0-yoda" dependencies = [ "apply", "ashpd 0.12.3", diff --git a/Cargo.toml b/Cargo.toml index c42187c..ca0a1cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,21 +9,23 @@ rust-version = "1.90" [workspace.dependencies] cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" } tokio = { version = "1.49.0", features = ["macros"] } -iced_winit = { git = "https://github.com/pop-os/libcosmic", default-features = false } +# Yoda fork: direct path dep on iced_winit in libcosmic-yoda's submodule. +iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit", default-features = false } -[workspace.dependencies.libcosmic] +# Yoda fork — libcosmic-yoda by path, replaces upstream git dep. +[workspace.dependencies.libcosmic-yoda] features = [ "dbus-config", "desktop", "multi-window", - "winit", + "wayland", "tokio", "qr_code", ] -git = "https://github.com/pop-os/libcosmic" +path = "/home/lionel/Devels/libcosmic" [workspace.dependencies.cosmic-config] -git = "https://github.com/pop-os/libcosmic" +path = "/home/lionel/Devels/libcosmic/cosmic-config" [workspace.dependencies.cosmic-bg-config] git = "https://github.com/pop-os/cosmic-bg" @@ -69,19 +71,15 @@ cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", # [patch.'https://github.com/pop-os/cosmic-settings-daemon'] # cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" } -# For development and testing purposes -# [patch.'https://github.com/pop-os/libcosmic'] -# libcosmic = { path = "../libcosmic" } -# cosmic-config = { path = "../libcosmic/cosmic-config" } -# cosmic-theme = { path = "../libcosmic/cosmic-theme" } -# iced_futures = { path = "../libcosmic/iced/futures" } -# iced_winit = { path = "../libcosmic/iced/winit" } - -# libcosmic = { git = "https://github.com/pop-os/libcosmic//" } -# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" } -# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//" } -# iced_futures = { git = "https://github.com/pop-os/libcosmic//" } -# iced_winit = { git = "https://github.com/pop-os/libcosmic//" } +# Yoda fork: redirect every transitive dep that asks for pop-os/libcosmic +# (cosmic-bg-config, cosmic-comp-config, cosmic-idle-config, cosmic-panel-config, +# cosmic-settings-config, cosmic-settings-daemon-config) to our local paths so +# the whole graph resolves against a single cosmic-config / cosmic-theme / iced_*. +[patch.'https://github.com/pop-os/libcosmic'] +cosmic-config = { path = "/home/lionel/Devels/libcosmic/cosmic-config" } +cosmic-theme = { path = "/home/lionel/Devels/libcosmic/cosmic-theme" } +iced_futures = { path = "/home/lionel/Devels/libcosmic/iced/futures" } +iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit" } # [patch.'https://github.com/pop-os/dbus-settings-bindings'] # cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" } diff --git a/cosmic-settings/Cargo.toml b/cosmic-settings/Cargo.toml index 03c7a70..c5e3cca 100644 --- a/cosmic-settings/Cargo.toml +++ b/cosmic-settings/Cargo.toml @@ -59,7 +59,7 @@ image = { version = "0.25", default-features = false, features = [ indexmap = "2.13.0" itertools = "0.14.0" itoa = "1.0.17" -libcosmic.workspace = true +libcosmic-yoda.workspace = true iced_winit.workspace = true locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } sysinfo = { version = "=0.38.0", optional = true } @@ -187,12 +187,12 @@ page-window-management = ["cosmic-comp-config", "dep:cosmic-settings-config"] page-workspaces = ["cosmic-comp-config"] # Other features -a11y = ["libcosmic/a11y"] +a11y = ["libcosmic-yoda/a11y"] ashpd = ["dep:ashpd"] cosmic-comp-config = ["dep:cosmic-comp-config"] -dbus-config = ["libcosmic/dbus-config", "cosmic-config/dbus"] -single-instance = ["libcosmic/single-instance"] +dbus-config = ["libcosmic-yoda/dbus-config", "cosmic-config/dbus"] +single-instance = ["libcosmic-yoda/single-instance"] test = [] -wayland = ["libcosmic/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"] -wgpu = ["libcosmic/wgpu"] -xdg-portal = ["ashpd", "libcosmic/xdg-portal"] +wayland = ["libcosmic-yoda/wayland", "dep:cosmic-panel-config", "dep:cosmic-randr", "iced_winit/cctk"] +wgpu = ["libcosmic-yoda/wgpu"] +xdg-portal = ["ashpd", "libcosmic-yoda/xdg-portal"] diff --git a/cosmic-settings/src/pages/desktop/window_management.rs b/cosmic-settings/src/pages/desktop/window_management.rs index b93e0f8..7b68acc 100644 --- a/cosmic-settings/src/pages/desktop/window_management.rs +++ b/cosmic-settings/src/pages/desktop/window_management.rs @@ -27,6 +27,7 @@ pub enum Message { ShowActiveWindowHint(bool), ShowMaximizeButton(bool), ShowMinimizeButton(bool), + WindowControlsPositionStart(bool), SetEdgeSnapThreshold(u32), Surface(surface::Action), } @@ -177,6 +178,19 @@ impl Page { .set_show_minimize(&config, value); } } + Message::WindowControlsPositionStart(left) => { + if let Ok(config) = cosmic::config::CosmicTk::config() { + let position = if left { + cosmic::widget::WindowControlsPosition::Start + } else { + cosmic::widget::WindowControlsPosition::End + }; + let _res = cosmic::config::COSMIC_TK + .write() + .unwrap() + .set_window_controls_position(&config, position); + } + } Message::ShowActiveWindowHint(value) => { self.show_active_hint = value; if let Err(err) = self.comp_config.set("active_hint", value) { @@ -274,6 +288,7 @@ pub fn window_controls() -> Section { maximize = fl!("window-controls", "maximize"); minimize = fl!("window-controls", "minimize"); active_window_hint = fl!("window-controls", "active-window-hint"); + position_start = fl!("window-controls", "position-start"); }); Section::default() @@ -296,6 +311,13 @@ pub fn window_controls() -> Section { settings::item::builder(&descriptions[minimize]) .toggler(cosmic::config::show_minimize(), Message::ShowMinimizeButton), ) + .add(settings::item::builder(&descriptions[position_start]).toggler( + matches!( + cosmic::config::window_controls_position(), + cosmic::widget::WindowControlsPosition::Start + ), + Message::WindowControlsPositionStart, + )) .apply(Element::from) .map(crate::pages::Message::WindowManagement) }) diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 535477b..f5a614e 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -484,6 +484,7 @@ window-controls = Window controls .maximize = Show maximize button .minimize = Show minimize button .active-window-hint = Show active window hint + .position-start = Place buttons on the left (macOS style) focus-navigation = Focus navigation .focus-follows-cursor = Focus follows cursor diff --git a/i18n/fr/cosmic_settings.ftl b/i18n/fr/cosmic_settings.ftl index 419dc72..098a741 100644 --- a/i18n/fr/cosmic_settings.ftl +++ b/i18n/fr/cosmic_settings.ftl @@ -322,6 +322,7 @@ window-controls = Contrôles des fenêtres .maximize = Afficher le bouton maximiser .minimize = Afficher le bouton minimiser .active-window-hint = Afficher l'indice de la fenêtre active + .position-start = Placer les boutons à gauche (style macOS) focus-navigation = Navigation par le focus .focus-follows-cursor = Le focus suit le curseur .focus-follows-cursor-delay = Délai de suivi du focus en ms diff --git a/page/Cargo.toml b/page/Cargo.toml index 7547599..d45d828 100644 --- a/page/Cargo.toml +++ b/page/Cargo.toml @@ -7,7 +7,7 @@ edition = "2024" derive_setters = "0.1.9" regex = "1.12.3" slotmap = "1.1.1" -libcosmic = { workspace = true } +libcosmic-yoda = { workspace = true } downcast-rs = "2.0.2" url = "2.5.8" slab = "0.4.12" diff --git a/subscriptions/sound/Cargo.toml b/subscriptions/sound/Cargo.toml index adf5891..e8c81e2 100644 --- a/subscriptions/sound/Cargo.toml +++ b/subscriptions/sound/Cargo.toml @@ -10,7 +10,7 @@ publish = true cosmic-pipewire = { path = "../../crates/cosmic-pipewire" } futures = "0.3.32" intmap = "3.1.3" -libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = false } +libcosmic-yoda = { path = "/home/lionel/Devels/libcosmic", default-features = false } numtoa = "1.0.0-alpha1" rustix = "1.1.3" tokio = { version = "1.49.0", features = ["process", "rt", "time"] } From 546299dbb75726455ebe33adec69f5ef54d6c8a6 Mon Sep 17 00:00:00 2001 From: leyoda Date: Thu, 23 Apr 2026 18:46:17 +0200 Subject: [PATCH 06/11] lockfile: libcosmic-yoda 0.1.0-yoda -> 0.1.0-yoda.2 Picks up the yoda-v2 libcosmic changes (color_picker Theme ref + context_menu/menu winit ungate). Binary rebuilt and installed. --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5ecab30..4cbc03b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4550,7 +4550,7 @@ checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libcosmic-yoda" -version = "0.1.0-yoda" +version = "0.1.0-yoda.2" dependencies = [ "apply", "ashpd 0.12.3", From d8a5350fee6bfabb51093565a3772bd583cf8646 Mon Sep 17 00:00:00 2001 From: leyoda Date: Fri, 24 Apr 2026 07:09:49 +0200 Subject: [PATCH 07/11] yoda wayland-v5: redirect window_clipboard + cosmic-text to local forks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Propagates the [patch] blocks added in cosmic-yoterm v5 to keep the whole yoda app family on a single Wayland-only stack. Without these, iced_winit fails to select a window_clipboard version because our fork exposes a `wayland` feature that upstream doesn't. - window_clipboard → /home/lionel/Devels/window_clipboard (x11 gated behind opt-in feature) - cosmic-text → /home/lionel/Devels/cosmic-text (EAW terminal_cells + upstream PR#503 applied) --- Cargo.lock | 164 ++--------------------------------------------------- Cargo.toml | 10 ++++ 2 files changed, 14 insertions(+), 160 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4cbc03b..445758b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -355,12 +355,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - [[package]] name = "as-slice" version = "0.2.1" @@ -1135,7 +1129,6 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "objc", "objc-foundation", @@ -1145,22 +1138,12 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "dnd", "mime 0.1.0", "smithay-clipboard", ] -[[package]] -name = "clipboard_x11" -version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" -dependencies = [ - "thiserror 1.0.69", - "x11rb", -] - [[package]] name = "cocoa" version = "0.25.0" @@ -1937,12 +1920,6 @@ dependencies = [ "uncased", ] -[[package]] -name = "ctor-lite" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e162d0c2e2068eb736b71e5597eff0b9944e6b973cd9f37b6a288ab9bf20e300" - [[package]] name = "cursor-icon" version = "1.2.0" @@ -2199,7 +2176,6 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "bitflags 2.11.1", "mime 0.1.0", @@ -2234,45 +2210,6 @@ name = "dpi" version = "0.1.2" source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" -[[package]] -name = "drm" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" -dependencies = [ - "bitflags 2.11.1", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "rustix 0.38.44", -] - -[[package]] -name = "drm-ffi" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" -dependencies = [ - "drm-sys", - "rustix 0.38.44", -] - -[[package]] -name = "drm-fourcc" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" - -[[package]] -name = "drm-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" -dependencies = [ - "libc", - "linux-raw-sys 0.6.5", -] - [[package]] name = "dyn-clone" version = "1.0.20" @@ -2817,16 +2754,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" -dependencies = [ - "rustix 1.1.4", - "windows-link 0.2.1", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -3392,7 +3319,6 @@ dependencies = [ name = "iced_wgpu" version = "0.14.0" dependencies = [ - "as-raw-xcb-connection", "bitflags 2.11.1", "bytemuck", "cosmic-client-toolkit", @@ -3409,13 +3335,11 @@ dependencies = [ "rustc-hash 2.1.2", "rustix 0.38.44", "thiserror 2.0.18", - "tiny-xlib", "wayland-backend", "wayland-client", "wayland-protocols", "wayland-sys", "wgpu", - "x11rb", ] [[package]] @@ -4726,12 +4650,6 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" -[[package]] -name = "linux-raw-sys" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -4964,7 +4882,6 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "smithay-clipboard", ] @@ -6991,12 +6908,10 @@ name = "softbuffer" version = "0.4.1" source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#a3f77e251e7422803f693df6e3fc313c010c4dcb" dependencies = [ - "as-raw-xcb-connection", "bytemuck", "cfg_aliases 0.2.1", "cocoa", "core-graphics", - "drm", "fastrand", "foreign-types", "js-sys", @@ -7006,14 +6921,12 @@ dependencies = [ "raw-window-handle", "redox_syscall 0.5.18", "rustix 0.38.44", - "tiny-xlib", "wasm-bindgen", "wayland-backend", "wayland-client", "wayland-sys", "web-sys", "windows-sys 0.52.0", - "x11rb", ] [[package]] @@ -7365,19 +7278,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tiny-xlib" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" -dependencies = [ - "as-raw-xcb-connection", - "ctor-lite", - "libloading", - "pkg-config", - "tracing", -] - [[package]] name = "tinystr" version = "0.8.3" @@ -8355,12 +8255,10 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", - "clipboard_x11", "dnd", "mime 0.1.0", "raw-window-handle", @@ -8884,7 +8782,6 @@ dependencies = [ "winit-wayland", "winit-web", "winit-win32", - "winit-x11", ] [[package]] @@ -8935,7 +8832,6 @@ dependencies = [ "smol_str", "tracing", "winit-core", - "x11-dl", "xkbcommon-dl", ] @@ -9053,29 +8949,6 @@ dependencies = [ "winit-core", ] -[[package]] -name = "winit-x11" -version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" -dependencies = [ - "bitflags 2.11.1", - "bytemuck", - "calloop", - "cursor-icon", - "dpi", - "libc", - "percent-encoding", - "raw-window-handle", - "rustix 1.1.4", - "smol_str", - "tracing", - "winit-common", - "winit-core", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - [[package]] name = "winnow" version = "0.6.24" @@ -9206,39 +9079,6 @@ dependencies = [ "either", ] -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x11rb" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 1.1.4", - "x11rb-protocol", - "xcursor", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" - [[package]] name = "xcursor" version = "0.3.10" @@ -9689,3 +9529,7 @@ dependencies = [ "syn 2.0.117", "winnow 0.7.15", ] + +[[patch.unused]] +name = "cosmic-text" +version = "0.19.0" diff --git a/Cargo.toml b/Cargo.toml index ca0a1cd..395b8fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,16 @@ iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit" } # upower_dbus = { path = "../dbus-settings-bindings/upower" } # nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings//", branch = "nm-secret-agent" } +# Yoda wayland cut v5: redirect window_clipboard + cosmic-text to our local +# forks (x11 gated behind opt-in feature + EAW/PR#503 respectively). +[patch.'https://github.com/pop-os/window_clipboard.git'] +window_clipboard = { path = "/home/lionel/Devels/window_clipboard" } +dnd = { path = "/home/lionel/Devels/window_clipboard/dnd" } +mime = { path = "/home/lionel/Devels/window_clipboard/mime" } + +[patch.'https://github.com/pop-os/cosmic-text'] +cosmic-text = { path = "/home/lionel/Devels/cosmic-text" } + [patch.crates-io] atspi = { git = "https://github.com/wash2/atspi" } atspi-common = { git = "https://github.com/wash2/atspi" } From 16172ad5a3b0a80fb2a069ab8eef34d6457c40fc Mon Sep 17 00:00:00 2001 From: leyoda Date: Sat, 16 May 2026 18:08:59 +0200 Subject: [PATCH 08/11] yoda: relocate local fork paths from ~/Devels to ~/Projets/COSMIC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mise à jour des path= absolus (libcosmic, cosmic-config, cosmic-theme, iced_futures/winit, window_clipboard, dnd, mime, cosmic-text) après consolidation des forks cosmic-* sous ~/Projets/COSMIC/. Inclut subscriptions/sound/Cargo.toml (libcosmic-yoda). Leyoda 2026 – GPLv3 --- Cargo.toml | 22 +++++++++++----------- subscriptions/sound/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 395b8fd..0b6601c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ rust-version = "1.90" cosmic-randr = { git = "https://github.com/pop-os/cosmic-randr" } tokio = { version = "1.49.0", features = ["macros"] } # Yoda fork: direct path dep on iced_winit in libcosmic-yoda's submodule. -iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit", default-features = false } +iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit", default-features = false } # Yoda fork — libcosmic-yoda by path, replaces upstream git dep. [workspace.dependencies.libcosmic-yoda] @@ -22,10 +22,10 @@ features = [ "tokio", "qr_code", ] -path = "/home/lionel/Devels/libcosmic" +path = "/home/lionel/Projets/COSMIC/libcosmic" [workspace.dependencies.cosmic-config] -path = "/home/lionel/Devels/libcosmic/cosmic-config" +path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" [workspace.dependencies.cosmic-bg-config] git = "https://github.com/pop-os/cosmic-bg" @@ -76,10 +76,10 @@ cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", # cosmic-settings-config, cosmic-settings-daemon-config) to our local paths so # the whole graph resolves against a single cosmic-config / cosmic-theme / iced_*. [patch.'https://github.com/pop-os/libcosmic'] -cosmic-config = { path = "/home/lionel/Devels/libcosmic/cosmic-config" } -cosmic-theme = { path = "/home/lionel/Devels/libcosmic/cosmic-theme" } -iced_futures = { path = "/home/lionel/Devels/libcosmic/iced/futures" } -iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit" } +cosmic-config = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config" } +cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" } +iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" } +iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } # [patch.'https://github.com/pop-os/dbus-settings-bindings'] # cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" } @@ -89,12 +89,12 @@ iced_winit = { path = "/home/lionel/Devels/libcosmic/iced/winit" } # Yoda wayland cut v5: redirect window_clipboard + cosmic-text to our local # forks (x11 gated behind opt-in feature + EAW/PR#503 respectively). [patch.'https://github.com/pop-os/window_clipboard.git'] -window_clipboard = { path = "/home/lionel/Devels/window_clipboard" } -dnd = { path = "/home/lionel/Devels/window_clipboard/dnd" } -mime = { path = "/home/lionel/Devels/window_clipboard/mime" } +window_clipboard = { path = "/home/lionel/Projets/COSMIC/window_clipboard" } +dnd = { path = "/home/lionel/Projets/COSMIC/window_clipboard/dnd" } +mime = { path = "/home/lionel/Projets/COSMIC/window_clipboard/mime" } [patch.'https://github.com/pop-os/cosmic-text'] -cosmic-text = { path = "/home/lionel/Devels/cosmic-text" } +cosmic-text = { path = "/home/lionel/Projets/COSMIC/cosmic-text" } [patch.crates-io] atspi = { git = "https://github.com/wash2/atspi" } diff --git a/subscriptions/sound/Cargo.toml b/subscriptions/sound/Cargo.toml index e8c81e2..0ea0154 100644 --- a/subscriptions/sound/Cargo.toml +++ b/subscriptions/sound/Cargo.toml @@ -10,7 +10,7 @@ publish = true cosmic-pipewire = { path = "../../crates/cosmic-pipewire" } futures = "0.3.32" intmap = "3.1.3" -libcosmic-yoda = { path = "/home/lionel/Devels/libcosmic", default-features = false } +libcosmic-yoda = { path = "/home/lionel/Projets/COSMIC/libcosmic", default-features = false } numtoa = "1.0.0-alpha1" rustix = "1.1.3" tokio = { version = "1.49.0", features = ["process", "rt", "time"] } From f19473a05c0f180b7058627c1d3026978b8cc972 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Sat, 23 May 2026 20:49:24 +0200 Subject: [PATCH 09/11] chore: align subscriptions with local stack --- Cargo.lock | 25 +++++++++++++------- Cargo.toml | 9 +++---- subscriptions/a11y-manager/Cargo.toml | 4 ++-- subscriptions/accessibility/Cargo.toml | 2 +- subscriptions/airplane-mode/Cargo.toml | 2 +- subscriptions/network-manager/Cargo.toml | 2 +- subscriptions/network-manager/src/devices.rs | 2 +- subscriptions/network-manager/src/lib.rs | 2 +- subscriptions/pulse/Cargo.toml | 2 +- subscriptions/pulse/src/lib.rs | 4 ++-- subscriptions/settings-daemon/Cargo.toml | 2 +- subscriptions/upower/Cargo.toml | 2 +- 12 files changed, 32 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 445758b..0a5240f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1352,7 +1352,7 @@ version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols//?rev=d0e95be#d0e95be25e423cfe523b11111a3666ed7aaf0dc4" dependencies = [ "bitflags 2.11.1", - "cosmic-protocols", + "cosmic-protocols 0.1.0", "libc", "smithay-client-toolkit", "wayland-client", @@ -1495,12 +1495,25 @@ dependencies = [ "wayland-server", ] +[[package]] +name = "cosmic-protocols" +version = "0.2.0" +dependencies = [ + "bitflags 2.11.1", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "wayland-server", +] + [[package]] name = "cosmic-randr" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-randr#6e8e795970fa06d434af22775e415b517f7552d3" dependencies = [ - "cosmic-protocols", + "cosmic-protocols 0.1.0", "indexmap 2.14.0", "thiserror 2.0.18", "tokio", @@ -1537,7 +1550,7 @@ dependencies = [ "cosmic-idle-config", "cosmic-mime-apps", "cosmic-panel-config", - "cosmic-protocols", + "cosmic-protocols 0.1.0", "cosmic-randr", "cosmic-randr-shell", "cosmic-settings-a11y-manager-subscription", @@ -1608,7 +1621,7 @@ dependencies = [ name = "cosmic-settings-a11y-manager-subscription" version = "1.0.7" dependencies = [ - "cosmic-protocols", + "cosmic-protocols 0.2.0", "iced_futures", "num-derive", "num-traits", @@ -9529,7 +9542,3 @@ dependencies = [ "syn 2.0.117", "winnow 0.7.15", ] - -[[patch.unused]] -name = "cosmic-text" -version = "0.19.0" diff --git a/Cargo.toml b/Cargo.toml index 0b6601c..11bfb64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,16 +86,13 @@ iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } # upower_dbus = { path = "../dbus-settings-bindings/upower" } # nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings//", branch = "nm-secret-agent" } -# Yoda wayland cut v5: redirect window_clipboard + cosmic-text to our local -# forks (x11 gated behind opt-in feature + EAW/PR#503 respectively). -[patch.'https://github.com/pop-os/window_clipboard.git'] +# Yoda wayland cut v5: redirect window_clipboard to the local fork +# (x11 gated behind opt-in feature). +[patch.'https://forge.aditua.com/leyoda/window_clipboard.git'] window_clipboard = { path = "/home/lionel/Projets/COSMIC/window_clipboard" } dnd = { path = "/home/lionel/Projets/COSMIC/window_clipboard/dnd" } mime = { path = "/home/lionel/Projets/COSMIC/window_clipboard/mime" } -[patch.'https://github.com/pop-os/cosmic-text'] -cosmic-text = { path = "/home/lionel/Projets/COSMIC/cosmic-text" } - [patch.crates-io] atspi = { git = "https://github.com/wash2/atspi" } atspi-common = { git = "https://github.com/wash2/atspi" } diff --git a/subscriptions/a11y-manager/Cargo.toml b/subscriptions/a11y-manager/Cargo.toml index bfdf7c2..8bb0c2b 100644 --- a/subscriptions/a11y-manager/Cargo.toml +++ b/subscriptions/a11y-manager/Cargo.toml @@ -7,8 +7,8 @@ rust-version.workspace = true publish = true [dependencies] -cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols" } -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +cosmic-protocols = { path = "../../../cosmic-protocols" } +iced_futures = { path = "../../../libcosmic/iced/futures" } num-derive = "0.4.2" num-traits = "0.2.19" sctk.workspace = true diff --git a/subscriptions/accessibility/Cargo.toml b/subscriptions/accessibility/Cargo.toml index 2a3b5e6..2491153 100644 --- a/subscriptions/accessibility/Cargo.toml +++ b/subscriptions/accessibility/Cargo.toml @@ -9,7 +9,7 @@ publish = true [dependencies] cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings" } futures = "0.3.32" -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } tokio = { version = "1.49.0", features = ["sync", "time"] } tracing = "0.1.44" zbus = "5.13" diff --git a/subscriptions/airplane-mode/Cargo.toml b/subscriptions/airplane-mode/Cargo.toml index 403f6fe..4fda29b 100644 --- a/subscriptions/airplane-mode/Cargo.toml +++ b/subscriptions/airplane-mode/Cargo.toml @@ -8,7 +8,7 @@ publish = true [dependencies] futures = "0.3.32" -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } log = "0.4.29" rustix = "1.1.3" tokio = "1.49.0" diff --git a/subscriptions/network-manager/Cargo.toml b/subscriptions/network-manager/Cargo.toml index e40a2a8..c66a4ca 100644 --- a/subscriptions/network-manager/Cargo.toml +++ b/subscriptions/network-manager/Cargo.toml @@ -11,7 +11,7 @@ cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bi secret-service = { version = "5.1.0", features = ["rt-tokio-crypto-rust"] } nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings" } futures = "0.3.32" -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } itertools = "0.14.0" secure-string = "0.3.0" thiserror = "2.0.18" diff --git a/subscriptions/network-manager/src/devices.rs b/subscriptions/network-manager/src/devices.rs index 235b0b5..e4e976f 100644 --- a/subscriptions/network-manager/src/devices.rs +++ b/subscriptions/network-manager/src/devices.rs @@ -185,7 +185,7 @@ pub fn subscription( conn, }, |Wrapper { - id, + id: _, has_popup, conn, }| { diff --git a/subscriptions/network-manager/src/lib.rs b/subscriptions/network-manager/src/lib.rs index 631eda9..55892b1 100644 --- a/subscriptions/network-manager/src/lib.rs +++ b/subscriptions/network-manager/src/lib.rs @@ -141,7 +141,7 @@ pub fn subscription( self.id.hash(state); } } - Subscription::run_with(Wrapper { id, conn }, |Wrapper { id, conn }| { + Subscription::run_with(Wrapper { id, conn }, |Wrapper { id: _, conn }| { let conn = conn.clone(); stream::channel( 50, diff --git a/subscriptions/pulse/Cargo.toml b/subscriptions/pulse/Cargo.toml index cc4760b..48c2adc 100644 --- a/subscriptions/pulse/Cargo.toml +++ b/subscriptions/pulse/Cargo.toml @@ -7,6 +7,6 @@ rust-version.workspace = true [dependencies] libpulse-binding = { version = "2.30.1" } rustix = { version = "1.1.3", features = ["pipe"] } -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } futures = "0.3.32" log = "0.4.27" diff --git a/subscriptions/pulse/src/lib.rs b/subscriptions/pulse/src/lib.rs index 4220765..ca407f7 100644 --- a/subscriptions/pulse/src/lib.rs +++ b/subscriptions/pulse/src/lib.rs @@ -288,7 +288,7 @@ impl PulseChannels { /// Set the speaker balance of the active sink. pub fn set_balance(&mut self, balance: f32) { if let Err(err) = self.tx.send(Request::Balance(self.index, balance)) { - log::error!("Failed to send new balance to channel"); + log::error!("Failed to send new balance to channel: {err}"); } else { self.pipe_tx .write_all(&[1]) @@ -299,7 +299,7 @@ impl PulseChannels { /// Set the volume of the active sink. pub fn set_volume(&mut self, volume: f32) { if let Err(err) = self.tx.send(Request::Volume(self.index, volume)) { - log::error!("Failed to send new volume to channel"); + log::error!("Failed to send new volume to channel: {err}"); } else { self.pipe_tx .write_all(&[1]) diff --git a/subscriptions/settings-daemon/Cargo.toml b/subscriptions/settings-daemon/Cargo.toml index aa67fbe..59160d0 100644 --- a/subscriptions/settings-daemon/Cargo.toml +++ b/subscriptions/settings-daemon/Cargo.toml @@ -7,7 +7,7 @@ publish = true [dependencies] futures = "0.3.32" -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } log = "0.4.29" tokio = "1.49.0" tokio-stream = "0.1.18" diff --git a/subscriptions/upower/Cargo.toml b/subscriptions/upower/Cargo.toml index 4121a10..3a468c8 100644 --- a/subscriptions/upower/Cargo.toml +++ b/subscriptions/upower/Cargo.toml @@ -8,7 +8,7 @@ publish = true [dependencies] futures = "0.3.32" -iced_futures = { git = "https://github.com/pop-os/libcosmic" } +iced_futures = { path = "../../../libcosmic/iced/futures" } log = "0.4.29" tokio = "1.49.0" tokio-stream = "0.1.18" From 331aba9d95239b8f139aec080ef6a4b2058c6f4f Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 09:55:11 +0200 Subject: [PATCH 10/11] yoda: use local dbus settings bindings --- Cargo.lock | 12 +----------- Cargo.toml | 5 ----- cosmic-settings/Cargo.toml | 16 ++++++++-------- subscriptions/accessibility/Cargo.toml | 2 +- subscriptions/bluetooth/Cargo.toml | 2 +- subscriptions/network-manager/Cargo.toml | 4 ++-- subscriptions/upower/Cargo.toml | 2 +- 7 files changed, 14 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a5240f..b4a9e4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,7 +104,6 @@ dependencies = [ [[package]] name = "accounts-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -825,7 +824,6 @@ dependencies = [ [[package]] name = "bluez-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "futures-channel", "futures-util", @@ -1402,7 +1400,6 @@ dependencies = [ [[package]] name = "cosmic-dbus-a11y" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -1410,7 +1407,6 @@ dependencies = [ [[package]] name = "cosmic-dbus-networkmanager" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "bitflags 2.11.1", "derive_builder", @@ -1680,8 +1676,7 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" -version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" +version = "0.1.1-yoda.1" dependencies = [ "zbus", ] @@ -3088,7 +3083,6 @@ checksum = "f558a64ac9af88b5ba400d99b579451af0d39c6d360980045b91aac966d705e2" [[package]] name = "hostname1-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -4684,7 +4678,6 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "locale1" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -5026,7 +5019,6 @@ dependencies = [ [[package]] name = "nm-secret-agent-manager" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -7260,7 +7252,6 @@ dependencies = [ [[package]] name = "timedate-zbus" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "zbus", ] @@ -7650,7 +7641,6 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "upower_dbus" version = "0.3.2" -source = "git+https://github.com/pop-os/dbus-settings-bindings#507e342c21d3ce6ae41b1d4f3fa2f0ad5ee23e75" dependencies = [ "serde", "serde_repr", diff --git a/Cargo.toml b/Cargo.toml index 11bfb64..01250d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,11 +81,6 @@ cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" } iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" } iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } -# [patch.'https://github.com/pop-os/dbus-settings-bindings'] -# cosmic-dbus-networkmanager = { path = "../dbus-settings-bindings/networkmanager" } -# upower_dbus = { path = "../dbus-settings-bindings/upower" } -# nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings//", branch = "nm-secret-agent" } - # Yoda wayland cut v5: redirect window_clipboard to the local fork # (x11 gated behind opt-in feature). [patch.'https://forge.aditua.com/leyoda/window_clipboard.git'] diff --git a/cosmic-settings/Cargo.toml b/cosmic-settings/Cargo.toml index c5e3cca..6512e9c 100644 --- a/cosmic-settings/Cargo.toml +++ b/cosmic-settings/Cargo.toml @@ -9,7 +9,7 @@ publish = false xdgen = "0.1" [dependencies] -accounts-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +accounts-zbus = { path = "../../dbus-settings-bindings/accounts-zbus", optional = true } anyhow = "1.0" ashpd = { version = "0.12", default-features = false, features = [ "tokio", @@ -21,8 +21,8 @@ color-eyre = "0.6.5" cosmic-bg-config.workspace = true cosmic-comp-config = { workspace = true, optional = true } cosmic-config.workspace = true -cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } -nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +cosmic-dbus-networkmanager = { path = "../../dbus-settings-bindings/networkmanager", optional = true } +nm-secret-agent-manager = { path = "../../dbus-settings-bindings/nm-secret-agent-manager", optional = true } cosmic-idle-config.workspace = true cosmic-panel-config = { workspace = true, optional = true } cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", optional = true } @@ -47,7 +47,7 @@ eyre = "0.6.12" freedesktop-desktop-entry = "0.8.1" futures = "0.3.32" hostname-validator = "1.1.1" -hostname1-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +hostname1-zbus = { path = "../../dbus-settings-bindings/hostname1", optional = true } i18n-embed-fl = "0.10.0" image = { version = "0.25", default-features = false, features = [ "jpeg", @@ -61,7 +61,7 @@ itertools = "0.14.0" itoa = "1.0.17" libcosmic-yoda.workspace = true iced_winit.workspace = true -locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +locale1 = { path = "../../dbus-settings-bindings/locale1", optional = true } sysinfo = { version = "=0.38.0", optional = true } mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", optional = true } notify = "8.2.0" @@ -75,13 +75,13 @@ slab = "0.4.12" slotmap = "1.1.1" static_init = "1.0.4" sunrise = "3.0.0" -timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +timedate-zbus = { path = "../../dbus-settings-bindings/timedate", optional = true } tokio = { workspace = true, features = ["fs", "io-util", "process", "sync"] } tracing = "0.1.44" tracing-subscriber = { version = "0.3.22", features = ["env-filter"] } udev = { version = "0.9.3", optional = true } -upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } -bluez-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } +upower_dbus = { path = "../../dbus-settings-bindings/upower", optional = true } +bluez-zbus = { path = "../../dbus-settings-bindings/bluez", optional = true } url = "2.5.8" xkb-data = "0.2.2" xkeysym = { version = "0.2.1", optional = true } diff --git a/subscriptions/accessibility/Cargo.toml b/subscriptions/accessibility/Cargo.toml index 2491153..138f539 100644 --- a/subscriptions/accessibility/Cargo.toml +++ b/subscriptions/accessibility/Cargo.toml @@ -7,7 +7,7 @@ rust-version.workspace = true publish = true [dependencies] -cosmic-dbus-a11y = { git = "https://github.com/pop-os/dbus-settings-bindings" } +cosmic-dbus-a11y = { path = "../../../dbus-settings-bindings/a11y" } futures = "0.3.32" iced_futures = { path = "../../../libcosmic/iced/futures" } tokio = { version = "1.49.0", features = ["sync", "time"] } diff --git a/subscriptions/bluetooth/Cargo.toml b/subscriptions/bluetooth/Cargo.toml index 0fb5a0d..b6e9967 100644 --- a/subscriptions/bluetooth/Cargo.toml +++ b/subscriptions/bluetooth/Cargo.toml @@ -7,7 +7,7 @@ rust-version.workspace = true publish = true [dependencies] -bluez-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } +bluez-zbus = { path = "../../../dbus-settings-bindings/bluez" } futures = "0.3.32" iced_futures = { git = "https://github.com/pop-os/libcosmic" } tokio = "1.49.0" diff --git a/subscriptions/network-manager/Cargo.toml b/subscriptions/network-manager/Cargo.toml index c66a4ca..d72f126 100644 --- a/subscriptions/network-manager/Cargo.toml +++ b/subscriptions/network-manager/Cargo.toml @@ -7,9 +7,9 @@ rust-version.workspace = true publish = true [dependencies] -cosmic-dbus-networkmanager = { git = "https://github.com/pop-os/dbus-settings-bindings" } +cosmic-dbus-networkmanager = { path = "../../../dbus-settings-bindings/networkmanager" } secret-service = { version = "5.1.0", features = ["rt-tokio-crypto-rust"] } -nm-secret-agent-manager = { git = "https://github.com/pop-os/dbus-settings-bindings" } +nm-secret-agent-manager = { path = "../../../dbus-settings-bindings/nm-secret-agent-manager" } futures = "0.3.32" iced_futures = { path = "../../../libcosmic/iced/futures" } itertools = "0.14.0" diff --git a/subscriptions/upower/Cargo.toml b/subscriptions/upower/Cargo.toml index 3a468c8..568daee 100644 --- a/subscriptions/upower/Cargo.toml +++ b/subscriptions/upower/Cargo.toml @@ -12,5 +12,5 @@ iced_futures = { path = "../../../libcosmic/iced/futures" } log = "0.4.29" tokio = "1.49.0" tokio-stream = "0.1.18" -upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings" } +upower_dbus = { path = "../../../dbus-settings-bindings/upower" } zbus = "5.13.2" From 6f514db1b4c90bfc0cee6cea4635ef992cedb896 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Mon, 25 May 2026 11:34:55 +0200 Subject: [PATCH 11/11] chore: use local cosmic-text checkout --- Cargo.lock | 4 ++-- Cargo.toml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4a9e4d..cb40e12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1792,8 +1792,7 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.18.2" -source = "git+https://github.com/pop-os/cosmic-text.git#4d74f795cc771fdcc7ea0f9cacba63fcf036fad6" +version = "0.19.0" dependencies = [ "bitflags 2.11.1", "fontdb", @@ -1811,6 +1810,7 @@ dependencies = [ "unicode-linebreak", "unicode-script", "unicode-segmentation", + "unicode-width 0.2.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 01250d4..b05903c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,9 @@ cosmic-theme = { path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-theme" } iced_futures = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/futures" } iced_winit = { path = "/home/lionel/Projets/COSMIC/libcosmic/iced/winit" } +[patch.'https://github.com/pop-os/cosmic-text.git'] +cosmic-text = { path = "../cosmic-text" } + # Yoda wayland cut v5: redirect window_clipboard to the local fork # (x11 gated behind opt-in feature). [patch.'https://forge.aditua.com/leyoda/window_clipboard.git']