From e01b16f4a27e46e157cd671b9f16007b86360554 Mon Sep 17 00:00:00 2001 From: Hojjat Date: Thu, 10 Sep 2026 16:17:36 -0600 Subject: [PATCH 1/7] chore: adapt to changes in libcosmic --- Cargo.lock | 41 ++++++++++--------- cosmic-app-list/src/app.rs | 6 +-- cosmic-applet-a11y/src/app.rs | 6 +-- cosmic-applet-audio/src/lib.rs | 6 +-- cosmic-applet-battery/src/app.rs | 6 +-- cosmic-applet-bluetooth/src/app.rs | 6 +-- cosmic-applet-input-sources/src/lib.rs | 6 +-- cosmic-applet-minimize/src/lib.rs | 6 +-- cosmic-applet-network/src/app.rs | 6 +-- cosmic-applet-notifications/src/lib.rs | 6 +-- cosmic-applet-power/src/lib.rs | 6 +-- .../src/components/app.rs | 6 +-- cosmic-applet-tiling/src/window.rs | 6 +-- cosmic-applet-time/src/window.rs | 6 +-- .../src/components/app.rs | 6 +-- cosmic-panel-button/src/lib.rs | 6 +-- 16 files changed, 51 insertions(+), 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f686e916..03fe54d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -651,7 +651,7 @@ dependencies = [ [[package]] name = "build_helpers" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "cfg_aliases", ] @@ -1304,7 +1304,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1325,7 +1325,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "quote", "syn", @@ -1392,7 +1392,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#f664a34c788f09689be9efa88e41040d7e6361f1" +source = "git+https://github.com/pop-os/cosmic-panel#e6e6442d762291beeb908bb7dd8a2cefff8eb7d3" dependencies = [ "anyhow", "cosmic-config", @@ -1546,7 +1546,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "almost", "configparser", @@ -2880,7 +2880,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "build_helpers", "dnd", @@ -2902,7 +2902,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "accesskit", "accesskit_winit", @@ -2911,7 +2911,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "bitflags 2.13.0", "build_helpers", @@ -2937,7 +2937,7 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "iced_core", "iced_futures", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "futures", "iced_core", @@ -2961,7 +2961,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "bitflags 2.13.0", "bytemuck", @@ -2982,7 +2982,7 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "iced_graphics", "iced_runtime", @@ -2991,7 +2991,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3003,7 +3003,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "build_helpers", "bytes", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "bytemuck", "cosmic-text", @@ -3036,7 +3036,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "as-raw-xcb-connection", "bitflags 2.13.0", @@ -3068,7 +3068,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.2" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "build_helpers", "cosmic-client-toolkit", @@ -3087,7 +3087,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "build_helpers", "cosmic-client-toolkit", @@ -3915,7 +3915,7 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libcosmic" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#d4d71fd53e5ed6bd3a430089114dffa2da3cd498" +source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" dependencies = [ "apply", "ashpd 0.12.3", @@ -3955,6 +3955,7 @@ dependencies = [ "phf 0.13.1", "rfd", "ron 0.12.2", + "roxmltree", "rust-embed", "rustix 1.1.4", "serde", @@ -7901,7 +7902,7 @@ checksum = "2fb433233f2df9344722454bc7e96465c9d03bff9d77c248f9e7523fe79585b5" [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#f664a34c788f09689be9efa88e41040d7e6361f1" +source = "git+https://github.com/pop-os/cosmic-panel#e6e6442d762291beeb908bb7dd8a2cefff8eb7d3" dependencies = [ "serde", "wayland-protocols-wlr", diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index 8db96ee3..3e5a3a6d 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -420,7 +420,7 @@ enum Message { ConfigUpdated(AppListConfig), OpenFavorites, OpenActive, - Surface(surface::Action), + Surface(surface::Action), } fn index_in_list( @@ -1745,9 +1745,7 @@ impl cosmic::Application for CosmicAppList { } } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } diff --git a/cosmic-applet-a11y/src/app.rs b/cosmic-applet-a11y/src/app.rs index d03c087d..7414349b 100644 --- a/cosmic-applet-a11y/src/app.rs +++ b/cosmic-applet-a11y/src/app.rs @@ -64,7 +64,7 @@ enum Message { OpenSettings, DBusUpdate(accessibility::Response), WaylandUpdate(WaylandUpdate), - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for CosmicA11yApplet { @@ -288,9 +288,7 @@ impl cosmic::Application for CosmicA11yApplet { } }, Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-applet-audio/src/lib.rs b/cosmic-applet-audio/src/lib.rs index 38b93e1e..a24b5ffe 100644 --- a/cosmic-applet-audio/src/lib.rs +++ b/cosmic-applet-audio/src/lib.rs @@ -149,7 +149,7 @@ pub enum Message { SetSinkVolume(u32), SetSourceVolume(u32), Subscription(audio_client::Event), - Surface(surface::Action), + Surface(surface::Action), ToggleMediaControlsInTopPanel(bool), TogglePopup, ToggleSinkMute, @@ -542,9 +542,7 @@ impl cosmic::Application for Audio { } }, Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } Message::Client(client) => { if let Some(client) = Arc::into_inner(client) { diff --git a/cosmic-applet-battery/src/app.rs b/cosmic-applet-battery/src/app.rs index f5113eff..85cb8c64 100644 --- a/cosmic-applet-battery/src/app.rs +++ b/cosmic-applet-battery/src/app.rs @@ -212,7 +212,7 @@ enum Message { OpenSettings, SettingsDaemon(settings_daemon::Event), ZbusConnection(zbus::Result), - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for CosmicBatteryApplet { @@ -525,9 +525,7 @@ impl cosmic::Application for CosmicBatteryApplet { } }, Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-applet-bluetooth/src/app.rs b/cosmic-applet-bluetooth/src/app.rs index a3bba4c3..7bb799ea 100644 --- a/cosmic-applet-bluetooth/src/app.rs +++ b/cosmic-applet-bluetooth/src/app.rs @@ -75,7 +75,7 @@ enum Message { Token(TokenUpdate), OpenSettings, ToggleBluetooth(bool), - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for CosmicBluetoothApplet { @@ -303,9 +303,7 @@ impl cosmic::Application for CosmicBluetoothApplet { } } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } self.update_icon(); diff --git a/cosmic-applet-input-sources/src/lib.rs b/cosmic-applet-input-sources/src/lib.rs index 3109c888..d22d3e7b 100644 --- a/cosmic-applet-input-sources/src/lib.rs +++ b/cosmic-applet-input-sources/src/lib.rs @@ -98,7 +98,7 @@ pub enum Message { CompConfig(Box), SetActiveLayout(usize), KeyboardSettings, - Surface(surface::Action), + Surface(surface::Action), Rectangle(RectangleUpdate), WaylandConnection(Backend), Wayland(wayland::Event), @@ -190,9 +190,7 @@ impl cosmic::Application for Window { } } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } Message::Rectangle(u) => match u { RectangleUpdate::Rectangle(r) => { diff --git a/cosmic-applet-minimize/src/lib.rs b/cosmic-applet-minimize/src/lib.rs index 803ca97c..e58b6d02 100644 --- a/cosmic-applet-minimize/src/lib.rs +++ b/cosmic-applet-minimize/src/lib.rs @@ -126,7 +126,7 @@ enum Message { Closed(window::Id), OpenOverflowPopup, CloseOverflowPopup, - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for Minimize { @@ -294,9 +294,7 @@ impl cosmic::Application for Minimize { } Message::CloseOverflowPopup => todo!(), Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-applet-network/src/app.rs b/cosmic-applet-network/src/app.rs index 913712ca..b9baa109 100644 --- a/cosmic-applet-network/src/app.rs +++ b/cosmic-applet-network/src/app.rs @@ -1028,7 +1028,7 @@ pub(crate) enum Message { FocusSecureInput, NoOp, #[allow(dead_code)] // required by `cosmic::applet` surface path; not always emitted - Surface(surface::Action), + Surface(surface::Action), ActivateVpn(Arc), // UUID of VPN to activate DeactivateVpn(Arc), // UUID of VPN to deactivate VpnOperationFinished { @@ -1294,9 +1294,7 @@ impl cosmic::Application for CosmicNetworkApplet { return Task::batch(vec![forget_task, reconnect_task]); } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } Message::ActivateVpn(uuid) => { self.nm_state.pending_vpn = Some(PendingVpn { diff --git a/cosmic-applet-notifications/src/lib.rs b/cosmic-applet-notifications/src/lib.rs index 720f8d63..4041d486 100644 --- a/cosmic-applet-notifications/src/lib.rs +++ b/cosmic-applet-notifications/src/lib.rs @@ -78,7 +78,7 @@ enum Message { CardsToggled(String, bool), Token(TokenUpdate), OpenSettings, - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for Notifications { @@ -367,9 +367,7 @@ impl cosmic::Application for Notifications { } } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } self.update_icon(); diff --git a/cosmic-applet-power/src/lib.rs b/cosmic-applet-power/src/lib.rs index 3bdfbb13..c75d3e03 100644 --- a/cosmic-applet-power/src/lib.rs +++ b/cosmic-applet-power/src/lib.rs @@ -82,7 +82,7 @@ enum Message { Zbus(Result<(), zbus::Error>), Closed(window::Id), Token(TokenUpdate), - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for Power { @@ -202,9 +202,7 @@ impl cosmic::Application for Power { } }, Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-applet-status-area/src/components/app.rs b/cosmic-applet-status-area/src/components/app.rs index 3f458126..18551a02 100644 --- a/cosmic-applet-status-area/src/components/app.rs +++ b/cosmic-applet-status-area/src/components/app.rs @@ -38,7 +38,7 @@ pub enum Msg { TogglePopup(usize), Hovered(Option), WheelScrolled(ScrollDelta), - Surface(surface::Action), + Surface(surface::Action), ToggleOverflow, HoveredOverflow, Token(TokenUpdate), @@ -408,9 +408,7 @@ impl cosmic::Application for App { scroll(id, menu.item.item_proxy().clone(), delta, orientation) } Msg::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } Msg::ToggleOverflow => { if let Some(popup_id) = self.overflow_popup.take() { diff --git a/cosmic-applet-tiling/src/window.rs b/cosmic-applet-tiling/src/window.rs index d4090541..e6534270 100644 --- a/cosmic-applet-tiling/src/window.rs +++ b/cosmic-applet-tiling/src/window.rs @@ -55,7 +55,7 @@ pub enum Message { WorkspaceUpdate(WorkspacesUpdate), NewWorkspace(Entity), OpenSettings, - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for Window { @@ -234,9 +234,7 @@ impl cosmic::Application for Window { tokio::spawn(cosmic::process::spawn(cmd)); } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-applet-time/src/window.rs b/cosmic-applet-time/src/window.rs index 042dfc3d..a96b447f 100644 --- a/cosmic-applet-time/src/window.rs +++ b/cosmic-applet-time/src/window.rs @@ -106,7 +106,7 @@ pub enum Message { Token(TokenUpdate), ConfigChanged(TimeAppletConfig), TimezoneUpdate(String), - Surface(surface::Action), + Surface(surface::Action), } impl Window { @@ -673,9 +673,7 @@ impl cosmic::Application for Window { self.update(Message::Tick) } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } } diff --git a/cosmic-applet-workspaces/src/components/app.rs b/cosmic-applet-workspaces/src/components/app.rs index 62680f77..554bfa5b 100644 --- a/cosmic-applet-workspaces/src/components/app.rs +++ b/cosmic-applet-workspaces/src/components/app.rs @@ -89,7 +89,7 @@ enum Message { WorkspacePressed(ExtWorkspaceHandleV1), WheelScrolled(ScrollDelta), WorkspaceOverview, - Surface(surface::Action), + Surface(surface::Action), } impl cosmic::Application for IcedWorkspacesApplet { @@ -166,9 +166,7 @@ impl cosmic::Application for IcedWorkspacesApplet { let _ = ShellCommand::new("cosmic-workspaces").spawn(); } Message::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() diff --git a/cosmic-panel-button/src/lib.rs b/cosmic-panel-button/src/lib.rs index fe411f82..68c55af0 100644 --- a/cosmic-panel-button/src/lib.rs +++ b/cosmic-panel-button/src/lib.rs @@ -39,7 +39,7 @@ struct Button { enum Msg { Press, ConfigUpdated(CosmicPanelButtonConfig), - Surface(surface::Action), + Surface(surface::Action), } impl Button { @@ -141,9 +141,7 @@ impl cosmic::Application for Button { .unwrap_or_default(); } Msg::Surface(a) => { - return cosmic::task::message(cosmic::Action::Cosmic( - cosmic::app::Action::Surface(a), - )); + return cosmic::task::message(cosmic::Action::Surface(a)); } } Task::none() From da4c82bb08d60602c09bcc849e91f61336cea7cf Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 14 Sep 2026 18:51:36 +0200 Subject: [PATCH 2/7] i18n: translation updates from weblate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Amadɣas Co-authored-by: Andi Chandler Co-authored-by: Blauen Co-authored-by: Hosted Weblate Co-authored-by: Minerva มินท์ Co-authored-by: Quentin PAGÈS Co-authored-by: Satakun Utama Co-authored-by: lorduskordus Co-authored-by: taijuin Lee Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-app-list/kab/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-app-list/oc/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-audio/oc/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-battery/zh_Hant/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-bluetooth/kab/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-bluetooth/oc/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-bluetooth/th/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-network/kab/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-network/oc/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-network/th/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-time/cs/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applet-time/en_GB/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applets-desktop-entries/cs/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applets-desktop-entries/oc/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applets-desktop-entries/th/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-applets-desktop-entries/zh_Hant/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-workspaces-applet/en_GB/ Translation: Pop OS/COSMIC App List Applet Translation: Pop OS/COSMIC Applets Desktop Entries Translation: Pop OS/COSMIC Audio Applet Translation: Pop OS/COSMIC Battery Applet Translation: Pop OS/COSMIC Bluetooth Applet Translation: Pop OS/COSMIC Network Applet Translation: Pop OS/COSMIC Time Applet Translation: Pop OS/COSMIC Workspaces Applet --- cosmic-app-list/i18n/kab/cosmic_app_list.ftl | 2 +- cosmic-app-list/i18n/oc/cosmic_app_list.ftl | 2 ++ .../i18n/oc/cosmic_applet_audio.ftl | 1 + .../i18n/zh-TW/cosmic_applet_battery.ftl | 2 +- .../i18n/kab/cosmic_applet_bluetooth.ftl | 2 +- .../i18n/oc/cosmic_applet_bluetooth.ftl | 1 + .../i18n/th/cosmic_applet_bluetooth.ftl | 3 +++ .../i18n/kab/cosmic_applet_network.ftl | 2 +- .../i18n/oc/cosmic_applet_network.ftl | 2 ++ .../i18n/th/cosmic_applet_network.ftl | 4 +++ .../i18n/cs/cosmic_applet_time.ftl | 2 +- .../i18n/en-GB/cosmic_applet_time.ftl | 1 + .../i18n/en-GB/cosmic_applet_workspaces.ftl | 1 + i18n/cs/desktop_entries.ftl | 2 +- i18n/oc/desktop_entries.ftl | 26 +++++++++++++++++++ i18n/th/desktop_entries.ftl | 1 + i18n/zh-Hant/desktop_entries.ftl | 2 +- 17 files changed, 49 insertions(+), 7 deletions(-) diff --git a/cosmic-app-list/i18n/kab/cosmic_app_list.ftl b/cosmic-app-list/i18n/kab/cosmic_app_list.ftl index 0d7b0d15..a6141b52 100644 --- a/cosmic-app-list/i18n/kab/cosmic_app_list.ftl +++ b/cosmic-app-list/i18n/kab/cosmic_app_list.ftl @@ -1,7 +1,7 @@ run = Selkem run-on = Selkem ɣef { $gpu } run-on-default = (Amezwer) -quit = Tuffɣa +quit = Ffeɣ quit-all = Ffeɣ-iten akk new-window = Asfaylu Amaynut cosmic-app-list = Afeggag n yisnasen diff --git a/cosmic-app-list/i18n/oc/cosmic_app_list.ftl b/cosmic-app-list/i18n/oc/cosmic_app_list.ftl index 9129b9b4..ebf18389 100644 --- a/cosmic-app-list/i18n/oc/cosmic_app_list.ftl +++ b/cosmic-app-list/i18n/oc/cosmic_app_list.ftl @@ -1 +1,3 @@ cosmic-app-list = Cinta d’aplicacions +quit = Quitar +run = Executar diff --git a/cosmic-applet-audio/i18n/oc/cosmic_applet_audio.ftl b/cosmic-applet-audio/i18n/oc/cosmic_applet_audio.ftl index e69de29b..87d44967 100644 --- a/cosmic-applet-audio/i18n/oc/cosmic_applet_audio.ftl +++ b/cosmic-applet-audio/i18n/oc/cosmic_applet_audio.ftl @@ -0,0 +1 @@ +output = Sortida diff --git a/cosmic-applet-battery/i18n/zh-TW/cosmic_applet_battery.ftl b/cosmic-applet-battery/i18n/zh-TW/cosmic_applet_battery.ftl index 13f245e7..608f8a60 100644 --- a/cosmic-applet-battery/i18n/zh-TW/cosmic_applet_battery.ftl +++ b/cosmic-applet-battery/i18n/zh-TW/cosmic_applet_battery.ftl @@ -1,4 +1,4 @@ -battery = 電池 +battery = 省電 battery-desc = 降低效能與耗電量。 balanced = 平衡 balanced-desc = 標準效能與耗電量。 diff --git a/cosmic-applet-bluetooth/i18n/kab/cosmic_applet_bluetooth.ftl b/cosmic-applet-bluetooth/i18n/kab/cosmic_applet_bluetooth.ftl index b8139437..60232095 100644 --- a/cosmic-applet-bluetooth/i18n/kab/cosmic_applet_bluetooth.ftl +++ b/cosmic-applet-bluetooth/i18n/kab/cosmic_applet_bluetooth.ftl @@ -1,4 +1,4 @@ -cancel = Sefsex +cancel = Semmet connected = Yettwaqqen confirm = Sentem other-devices = Ibenkan-nniḍen n Bluetooth diff --git a/cosmic-applet-bluetooth/i18n/oc/cosmic_applet_bluetooth.ftl b/cosmic-applet-bluetooth/i18n/oc/cosmic_applet_bluetooth.ftl index 0eb4c751..4676e1c5 100644 --- a/cosmic-applet-bluetooth/i18n/oc/cosmic_applet_bluetooth.ftl +++ b/cosmic-applet-bluetooth/i18n/oc/cosmic_applet_bluetooth.ftl @@ -1 +1,2 @@ connected = Connectat +cancel = Anullar diff --git a/cosmic-applet-bluetooth/i18n/th/cosmic_applet_bluetooth.ftl b/cosmic-applet-bluetooth/i18n/th/cosmic_applet_bluetooth.ftl index e69de29b..ffb5afe0 100644 --- a/cosmic-applet-bluetooth/i18n/th/cosmic_applet_bluetooth.ftl +++ b/cosmic-applet-bluetooth/i18n/th/cosmic_applet_bluetooth.ftl @@ -0,0 +1,3 @@ +connected = เชื่อมต่อแล้ว +confirm = ยืนยัน +cancel = ยกเลิก diff --git a/cosmic-applet-network/i18n/kab/cosmic_applet_network.ftl b/cosmic-applet-network/i18n/kab/cosmic_applet_network.ftl index 68ce8e75..8bc6a315 100644 --- a/cosmic-applet-network/i18n/kab/cosmic_applet_network.ftl +++ b/cosmic-applet-network/i18n/kab/cosmic_applet_network.ftl @@ -1,4 +1,4 @@ -cancel = Sefsex +cancel = Semmet connect = Qqen identity = Tamagit wifi = Wi-Fi diff --git a/cosmic-applet-network/i18n/oc/cosmic_applet_network.ftl b/cosmic-applet-network/i18n/oc/cosmic_applet_network.ftl index fafd4068..45cd8472 100644 --- a/cosmic-applet-network/i18n/oc/cosmic_applet_network.ftl +++ b/cosmic-applet-network/i18n/oc/cosmic_applet_network.ftl @@ -1,3 +1,5 @@ identity = Identitat connected = Connectat connect = Connectar +cancel = Anullar +network = Ret diff --git a/cosmic-applet-network/i18n/th/cosmic_applet_network.ftl b/cosmic-applet-network/i18n/th/cosmic_applet_network.ftl index e69de29b..7d03ac66 100644 --- a/cosmic-applet-network/i18n/th/cosmic_applet_network.ftl +++ b/cosmic-applet-network/i18n/th/cosmic_applet_network.ftl @@ -0,0 +1,4 @@ +connect = เชื่อมต่อ +identity = ตัวตน +connected = เชื่อมต่อแล้ว +cancel = ยกเลิก diff --git a/cosmic-applet-time/i18n/cs/cosmic_applet_time.ftl b/cosmic-applet-time/i18n/cs/cosmic_applet_time.ftl index 66f300f7..a006aa3f 100644 --- a/cosmic-applet-time/i18n/cs/cosmic_applet_time.ftl +++ b/cosmic-applet-time/i18n/cs/cosmic_applet_time.ftl @@ -1 +1 @@ -datetime-settings = Nastavení času, datumu a kalendáře... +datetime-settings = Nastavení času, data a kalendáře... diff --git a/cosmic-applet-time/i18n/en-GB/cosmic_applet_time.ftl b/cosmic-applet-time/i18n/en-GB/cosmic_applet_time.ftl index e69de29b..e6e784fd 100644 --- a/cosmic-applet-time/i18n/en-GB/cosmic_applet_time.ftl +++ b/cosmic-applet-time/i18n/en-GB/cosmic_applet_time.ftl @@ -0,0 +1 @@ +datetime-settings = Date, Time and Calendar Settings... diff --git a/cosmic-applet-workspaces/i18n/en-GB/cosmic_applet_workspaces.ftl b/cosmic-applet-workspaces/i18n/en-GB/cosmic_applet_workspaces.ftl index e69de29b..1a096680 100644 --- a/cosmic-applet-workspaces/i18n/en-GB/cosmic_applet_workspaces.ftl +++ b/cosmic-applet-workspaces/i18n/en-GB/cosmic_applet_workspaces.ftl @@ -0,0 +1 @@ +cosmic-applet-workspaces = COSMIC Workspaces diff --git a/i18n/cs/desktop_entries.ftl b/i18n/cs/desktop_entries.ftl index fc451530..0d14dca0 100644 --- a/i18n/cs/desktop_entries.ftl +++ b/i18n/cs/desktop_entries.ftl @@ -26,7 +26,7 @@ cosmic-applet-network-comment = Správa síťových připojení cosmic-applet-network-keywords = COSMIC;Applet;Síť; cosmic-applet-notifications-comment = Správa oznámení a režimu Nerušit cosmic-applet-notifications-keywords = COSMIC;Applet;Oznámení; -cosmic-applet-status-area-keywords = COSMIC;Applet;Aplikace;Indikátory;Oznámení;Notifikace;Oblast;Status;Stav; +cosmic-applet-status-area-keywords = COSMIC;Applet;Aplikace;Indikátory;Ikony;Oznámení;Notifikace;Oblast;Stav; cosmic-app-list-comment = Správa otevřených oken a spouštění připnutých aplikací cosmic-app-list-keywords = COSMIC;Applet;Aplikace;Oblast;Seznam;Úloha;Úlohy;Lišta; cosmic-applet-a11y-comment = Konfigurace nastavení přístupnosti z panelu diff --git a/i18n/oc/desktop_entries.ftl b/i18n/oc/desktop_entries.ftl index 894d5e1d..747c5d9b 100644 --- a/i18n/oc/desktop_entries.ftl +++ b/i18n/oc/desktop_entries.ftl @@ -17,3 +17,29 @@ cosmic-applet-power = Session utilizaire cosmic-applet-status-area = Cinta de notificacions cosmic-applet-time = Data, ora e calendièr cosmic-applet-workspaces = Espacis de trabalha numerotats +cosmic-applet-a11y-keywords = COSMIC;Applet;Microaplicacion;Miniaplicacion;Accessibilitat;A11y;Ecran;Lector;Lópia;Constraste;Color; +cosmic-applet-audio-comment = Seleccion del periferic àudio, contraròtle del volum e contraròtle multimèdia MPRIS +cosmic-applet-input-sources-keywords = COSMIC;Applet;Entrada;Dintrada;Font; +cosmic-applet-minimize = Fenèstras minimizadas +cosmic-applet-minimize-comment = Gerir las fenèstras minimizadas +cosmic-applet-minimize-keywords = COSMIC;Applet;Minimizar;Reduire;Redusir; +cosmic-applet-network-keywords = COSMIC;Applet;Ret;Malhum; +cosmic-applet-notifications-keywords = COSMIC;Applet;Notificacions; +cosmic-applet-power-comment = Verrolhar l’ecran, se desconnectar, metre en velha, reaviar e atudar l’ordenador +cosmic-applet-power-keywords = COSMIC;Applet;Utilizaire;Session;Verrolhar;Desconnectar;Reaviar;Reamodar;Atudar;Velha;Suspendre; +cosmic-applet-tiling = Mosaïc +cosmic-applet-time-comment = Mostrar l’ora actuala al panèl amb una fenèstra surgissenta del calendièr +cosmic-applet-time-keywords = COSMIC;Applet;Data;Ora;Temps;Calendièr;Calendari; +cosmic-applet-workspaces-comment = Bascular entre los espacis de trabalh del panèl estant +cosmic-applet-workspaces-keywords = COSMIC;Applet;Espaci de trabalh; +cosmic-panel-app-button = Boton de la bibliotèca d’aplicacions +cosmic-panel-app-button-comment = Dobrir la bibliotèca d’aplicacions per lançar las aplicacions installadas +cosmic-panel-launcher-button = Boton de l’aviador +cosmic-panel-launcher-button-comment = Dobrir l’aviador per recercar d’aplicacions e executar de comandas +cosmic-panel-workspaces-button = Boton dels espacis de trabalh +cosmic-applet-audio-keywords = COSMIC;Applet;Son,Àudio;MPRIS; +cosmic-applet-battery-keywords = COSMIC;Applet;Alimentacion;Energia;Batariá; +cosmic-applet-bluetooth-keywords = COSMIC;Applet;Bluetooth; +cosmic-applet-input-sources-comment = Cambiar entre fonts d’entrada +cosmic-applet-status-area-comment = Indicadors d’aplicacions que pòdon exportar de menús al panèl +cosmic-applet-status-area-keywords = COSMIC;Applet;App;Indicador;Indicator;Notificacion;Panèl;Estatut; diff --git a/i18n/th/desktop_entries.ftl b/i18n/th/desktop_entries.ftl index e69de29b..8cec35eb 100644 --- a/i18n/th/desktop_entries.ftl +++ b/i18n/th/desktop_entries.ftl @@ -0,0 +1 @@ +cosmic-applet-battery-keywords = COSMIC;Applet;Power;Battery;พลังงาน;แบตเตอรี่; diff --git a/i18n/zh-Hant/desktop_entries.ftl b/i18n/zh-Hant/desktop_entries.ftl index ef886f04..8e5d7634 100644 --- a/i18n/zh-Hant/desktop_entries.ftl +++ b/i18n/zh-Hant/desktop_entries.ftl @@ -38,7 +38,7 @@ cosmic-applet-bluetooth = 藍牙 cosmic-applet-audio = 音效 cosmic-applet-minimize = 最小化視窗 cosmic-app-list-comment = 啟動釘板的應用程式並管理開啟視窗 -cosmic-app-list-keywords = COSMIC;小程式;應用程式;匣盤;列表;任務;列; +cosmic-app-list-keywords = COSMIC;小程式;應用程式;拖盤;列表;任務;列; cosmic-applet-a11y-comment = 從面板設定無障礙功能 cosmic-applet-audio-comment = 音訊裝置選擇、音量控制及 MPRIS 媒體控制 cosmic-applet-input-sources = 輸入來源 From f2ef09d4a0e34335fe4e9f567c1868c7b1f8fd59 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 15 Sep 2026 20:11:08 -0600 Subject: [PATCH 3/7] Add cosmic-applet-osk --- Cargo.lock | 45 ++++++++---- Cargo.toml | 2 + cosmic-applet-osk/Cargo.toml | 12 ++++ .../data/com.system76.CosmicAppletOsk.desktop | 13 ++++ cosmic-applet-osk/src/lib.rs | 72 +++++++++++++++++++ cosmic-applet-osk/src/main.rs | 13 ++++ cosmic-applets/Cargo.toml | 1 + cosmic-applets/build.rs | 6 ++ cosmic-applets/src/main.rs | 1 + data/com.system76.CosmicApplets.metainfo.xml | 2 + debian/links | 1 + i18n/en/desktop_entries.ftl | 3 + justfile | 2 +- 13 files changed, 160 insertions(+), 13 deletions(-) create mode 100644 cosmic-applet-osk/Cargo.toml create mode 100644 cosmic-applet-osk/data/com.system76.CosmicAppletOsk.desktop create mode 100644 cosmic-applet-osk/src/lib.rs create mode 100644 cosmic-applet-osk/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index 03fe54d9..db8b5fab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -651,7 +651,7 @@ dependencies = [ [[package]] name = "build_helpers" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" +source = "git+https://github.com/pop-os/libcosmic#87ab8179e1bd9880239c340855ae8862034bd0e8" dependencies = [ "cfg_aliases", ] @@ -1156,6 +1156,17 @@ dependencies = [ "zbus", ] +[[package]] +name = "cosmic-applet-osk" +version = "1.0.15" +dependencies = [ + "cosmic-osk-config", + "libcosmic", + "tracing", + "tracing-log", + "tracing-subscriber", +] + [[package]] name = "cosmic-applet-power" version = "1.0.15" @@ -1257,6 +1268,7 @@ dependencies = [ "cosmic-applet-minimize", "cosmic-applet-network", "cosmic-applet-notifications", + "cosmic-applet-osk", "cosmic-applet-power", "cosmic-applet-status-area", "cosmic-applet-tiling", @@ -1304,7 +1316,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" +source = "git+https://github.com/pop-os/libcosmic#87ab8179e1bd9880239c340855ae8862034bd0e8" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1325,7 +1337,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" +source = "git+https://github.com/pop-os/libcosmic#87ab8179e1bd9880239c340855ae8862034bd0e8" dependencies = [ "quote", "syn", @@ -1376,6 +1388,15 @@ dependencies = [ "zbus", ] +[[package]] +name = "cosmic-osk-config" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-osk#d7b66a24890d03e38dd8962d956bc802d4a41067" +dependencies = [ + "cosmic-config", + "serde", +] + [[package]] name = "cosmic-panel-button" version = "1.0.15" @@ -1902,7 +1923,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2100,7 +2121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2911,7 +2932,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" +source = "git+https://github.com/pop-os/libcosmic#87ab8179e1bd9880239c340855ae8862034bd0e8" dependencies = [ "bitflags 2.13.0", "build_helpers", @@ -2947,7 +2968,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic#a401af8b1c54a8abd393b8c5b7c8809402f83850" +source = "git+https://github.com/pop-os/libcosmic#87ab8179e1bd9880239c340855ae8862034bd0e8" dependencies = [ "futures", "iced_core", @@ -3856,7 +3877,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a1886916523694cd6ea3d175f03a1e5010699a2a4cc13696d83d7bea1d80638" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4441,7 +4462,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5567,7 +5588,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6148,7 +6169,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.4", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7155,7 +7176,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ec720c7c..32a53854 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "cosmic-applet-minimize", "cosmic-applet-network", "cosmic-applet-notifications", + "cosmic-applet-osk", "cosmic-applet-power", "cosmic-applet-status-area", "cosmic-applet-tiling", @@ -27,6 +28,7 @@ resolver = "3" anyhow = "1.0.102" cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "a7d2d7a" } cosmic-applets-config = { path = "cosmic-applets-config" } +cosmic-osk-config = { git = "https://github.com/pop-os/cosmic-osk" } cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", default-features = false, features = [ "client", ], rev = "a7d2d7a" } diff --git a/cosmic-applet-osk/Cargo.toml b/cosmic-applet-osk/Cargo.toml new file mode 100644 index 00000000..3f007c58 --- /dev/null +++ b/cosmic-applet-osk/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "cosmic-applet-osk" +version = "1.0.15" +edition = "2024" +license = "GPL-3.0-only" + +[dependencies] +cosmic-osk-config.workspace = true +libcosmic.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +tracing-log.workspace = true diff --git a/cosmic-applet-osk/data/com.system76.CosmicAppletOsk.desktop b/cosmic-applet-osk/data/com.system76.CosmicAppletOsk.desktop new file mode 100644 index 00000000..0624bdc9 --- /dev/null +++ b/cosmic-applet-osk/data/com.system76.CosmicAppletOsk.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=On-screen Keyboard Button +Comment=Open the on-screen keyboard +Type=Application +Exec=cosmic-applet-osk +Terminal=false +Categories=COSMIC; +Keywords=COSMIC;Applet;OSK;Keyboard; +Icon=input-keyboard-symbolic +StartupNotify=true +NoDisplay=true +X-CosmicApplet=true +X-OverflowPriority=10 diff --git a/cosmic-applet-osk/src/lib.rs b/cosmic-applet-osk/src/lib.rs new file mode 100644 index 00000000..a1597757 --- /dev/null +++ b/cosmic-applet-osk/src/lib.rs @@ -0,0 +1,72 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use cosmic::{Task, app, cosmic_config::CosmicConfigEntry, iced}; +use cosmic_osk_config::Config; + +struct Button { + core: cosmic::app::Core, +} + +#[derive(Debug, Clone)] +enum Msg { + Press, +} + +impl cosmic::Application for Button { + type Message = Msg; + type Executor = cosmic::SingleThreadExecutor; + type Flags = (); + const APP_ID: &'static str = "com.system76.CosmicAppletOsk"; + + fn init(core: cosmic::app::Core, _: ()) -> (Self, app::Task) { + (Self { core }, Task::none()) + } + + fn core(&self) -> &cosmic::app::Core { + &self.core + } + + fn core_mut(&mut self) -> &mut cosmic::app::Core { + &mut self.core + } + + fn style(&self) -> Option { + Some(cosmic::applet::style()) + } + + fn update(&mut self, message: Msg) -> app::Task { + match message { + Msg::Press => match Config::handler() { + Ok(handler) => { + let mut config = match Config::get_entry(&handler) { + Ok(config) => config, + Err((errs, config)) => { + tracing::warn!("failed to parse OSK config: {:?}", errs); + config + } + }; + if let Err(err) = config.set_always_shown(&handler, !config.always_shown) { + tracing::error!("failed to set OSK always_shown config: {}", err); + } + } + Err(err) => { + tracing::error!("failed to create OSK config handler: {}", err); + } + }, + } + Task::none() + } + + fn view(&self) -> cosmic::Element<'_, Msg> { + self.core + .applet + .icon_button("input-keyboard-symbolic") + .on_press_down(Msg::Press) + .into() + } +} + +pub fn run() -> iced::Result { + cosmic::applet::run::