From 6630709970c7a171d850f61031943d3cecfe4a2b Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 16 Oct 2024 18:52:34 -0400 Subject: [PATCH] chore: update libcosmic enable desktop-systemd-scope --- Cargo.lock | 53 ++++++++++++------- Cargo.toml | 2 +- .../src/components/app.rs | 7 ++- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a538836..51bb64d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,6 +59,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -1268,7 +1269,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1290,7 +1291,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "quote", "syn 1.0.109", @@ -1348,7 +1349,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#4fedcbfc3574600b58de6da6c2401c92264537bd" +source = "git+https://github.com/pop-os/cosmic-panel#0ce85da198f02f94ad75441e64c0e165c41eb4ae" dependencies = [ "anyhow", "cosmic-config", @@ -1377,7 +1378,7 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#063c2ad0dbe090d7e1221817128098493838b13a" +source = "git+https://github.com/pop-os/dbus-settings-bindings#931f5db558bf3fcb572ff4e18f7f1618a7430046" dependencies = [ "zbus 4.4.0", ] @@ -1429,7 +1430,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "almost", "cosmic-config", @@ -2856,7 +2857,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "dnd", "iced_accessibility", @@ -2874,7 +2875,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "accesskit", "accesskit_unix", @@ -2883,7 +2884,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "bitflags 2.6.0", "dnd", @@ -2905,7 +2906,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "futures", "iced_core", @@ -2918,7 +2919,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "bitflags 2.6.0", "bytemuck", @@ -2942,7 +2943,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2954,7 +2955,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "dnd", "iced_accessibility", @@ -2968,7 +2969,7 @@ dependencies = [ [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "enum-repr", "float-cmp", @@ -2994,7 +2995,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "iced_core", "once_cell", @@ -3004,7 +3005,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "bytemuck", "cosmic-text", @@ -3021,7 +3022,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "as-raw-xcb-connection", "bitflags 2.6.0", @@ -3050,7 +3051,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "dnd", "iced_renderer", @@ -3731,7 +3732,7 @@ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#701638009df09a254b7d077ddc4d1076cd87a147" +source = "git+https://github.com/pop-os/libcosmic#9c62f19e4b80b6bcffde024698015d3a533cb944" dependencies = [ "apply", "ashpd 0.9.1", @@ -3771,6 +3772,7 @@ dependencies = [ "tracing", "unicode-segmentation", "url", + "ustr", "zbus 4.4.0", ] @@ -6217,6 +6219,19 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "ustr" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e904a2279a4a36d2356425bb20be271029cc650c335bc82af8bfae30085a3d0" +dependencies = [ + "ahash", + "byteorder", + "lazy_static", + "parking_lot 0.12.3", + "serde", +] + [[package]] name = "usvg" version = "0.37.0" @@ -6953,7 +6968,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#4fedcbfc3574600b58de6da6c2401c92264537bd" +source = "git+https://github.com/pop-os/cosmic-panel#0ce85da198f02f94ad75441e64c0e165c41eb4ae" dependencies = [ "serde", "wayland-protocols-wlr", diff --git a/Cargo.toml b/Cargo.toml index 78ff46b6..d758158a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ libcosmic = { git = "https://github.com/pop-os/libcosmic", default-features = fa "applet-token", "tokio", "wayland", - "desktop", + "desktop-systemd-scope", "dbus-config", ] } rust-embed = "8.3" diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index ae85a20e..2d9a372a 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -4,7 +4,6 @@ use cctk::sctk::reexports::{calloop::channel::SyncSender, client::backend::ObjectId}; use cosmic::{ applet::cosmic_panel_config::PanelAnchor, - font::FONT_BOLD, iced::{ alignment::{Horizontal, Vertical}, event, @@ -176,7 +175,11 @@ impl cosmic::Application for IcedWorkspacesApplet { let popup_index = self.popup_index().unwrap_or(self.workspaces.len()); let buttons = self.workspaces[..popup_index].iter().filter_map(|w| { - let content = self.core.applet.text(w.0.clone()).font(FONT_BOLD); + let content = self + .core + .applet + .text(w.0.clone()) + .font(cosmic::font::bold()); let (width, height) = if self.core.applet.is_horizontal() { (suggested_total as f32, suggested_window_size.1.get() as f32)