Compare commits

...

11 commits

Author SHA1 Message Date
6f514db1b4 chore: use local cosmic-text checkout 2026-05-25 11:34:55 +02:00
331aba9d95 yoda: use local dbus settings bindings 2026-05-25 09:55:11 +02:00
f19473a05c chore: align subscriptions with local stack 2026-05-23 20:49:24 +02:00
16172ad5a3 yoda: relocate local fork paths from ~/Devels to ~/Projets/COSMIC
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
2026-05-16 18:08:59 +02:00
d8a5350fee yoda wayland-v5: redirect window_clipboard + cosmic-text to local forks
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)
2026-04-24 07:09:49 +02:00
546299dbb7 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.
2026-04-23 18:46:17 +02:00
999e2ba4e5 yoda: rebase onto libcosmic-yoda via path deps + macOS controls toggle
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.
2026-04-23 17:33:22 +02:00
Ashley Wulber
78644a32e3
Revert "Changes the PageInner.size field to have no explicit default.… (#1977)
… 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 ba5fb65b44.

- [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 <levi@system76.com>
2026-04-22 14:33:37 -06:00
Tony Wasserka
c04e49e218 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.
2026-04-22 22:10:24 +02:00
Vukašin Vojinović
26f0fb0609 chore(default_apps): reduce code duplication
Also fixes the flex items wrapping too early by setting the FlexRow width to Shrink.
2026-04-22 22:10:06 +02:00
Vukašin Vojinović
317de19eb3 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.
2026-04-22 22:10:06 +02:00
28 changed files with 220 additions and 579 deletions

226
Cargo.lock generated
View file

@ -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",
]
@ -355,12 +354,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"
@ -831,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",
@ -1135,7 +1127,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 +1136,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"
@ -1199,7 +1180,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
dependencies = [
"serde",
"termcolor",
"unicode-width 0.1.14",
"unicode-width 0.2.2",
]
[[package]]
@ -1369,7 +1350,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",
@ -1391,7 +1372,6 @@ dependencies = [
[[package]]
name = "cosmic-config"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"atomicwrites",
"cosmic-config-derive",
@ -1412,7 +1392,6 @@ dependencies = [
[[package]]
name = "cosmic-config-derive"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"quote",
"syn 2.0.117",
@ -1421,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",
]
@ -1429,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",
@ -1514,12 +1491,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",
@ -1556,7 +1546,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",
@ -1588,7 +1578,7 @@ dependencies = [
"itertools 0.14.0",
"itoa",
"jiff",
"libcosmic",
"libcosmic-yoda",
"locale1",
"locales-rs",
"mime 0.3.17",
@ -1627,7 +1617,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",
@ -1686,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",
]
@ -1737,7 +1726,7 @@ version = "1.0.7"
dependencies = [
"derive_setters",
"downcast-rs 2.0.2",
"libcosmic",
"libcosmic-yoda",
"regex",
"slab",
"slotmap",
@ -1762,7 +1751,7 @@ dependencies = [
"cosmic-pipewire",
"futures",
"intmap",
"libcosmic",
"libcosmic-yoda",
"numtoa",
"rustix 1.1.4",
"tokio",
@ -1803,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",
@ -1822,12 +1810,12 @@ dependencies = [
"unicode-linebreak",
"unicode-script",
"unicode-segmentation",
"unicode-width 0.2.2",
]
[[package]]
name = "cosmic-theme"
version = "1.0.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"almost",
"configparser",
@ -1940,12 +1928,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"
@ -2202,7 +2184,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",
@ -2237,45 +2218,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"
@ -2820,16 +2762,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"
@ -3151,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",
]
@ -3250,7 +3181,6 @@ dependencies = [
[[package]]
name = "iced"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"dnd",
"iced_accessibility",
@ -3271,7 +3201,6 @@ dependencies = [
[[package]]
name = "iced_accessibility"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"accesskit",
"accesskit_winit",
@ -3280,7 +3209,6 @@ dependencies = [
[[package]]
name = "iced_core"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"bitflags 2.11.1",
"bytes",
@ -3305,7 +3233,6 @@ dependencies = [
[[package]]
name = "iced_debug"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"iced_core",
"iced_futures",
@ -3315,7 +3242,6 @@ dependencies = [
[[package]]
name = "iced_futures"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"futures",
"iced_core",
@ -3329,7 +3255,6 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"bitflags 2.11.1",
"bytemuck",
@ -3350,7 +3275,6 @@ dependencies = [
[[package]]
name = "iced_program"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"iced_graphics",
"iced_runtime",
@ -3359,7 +3283,6 @@ dependencies = [
[[package]]
name = "iced_renderer"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@ -3371,7 +3294,6 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"bytes",
"cosmic-client-toolkit",
@ -3387,7 +3309,6 @@ dependencies = [
[[package]]
name = "iced_tiny_skia"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"bytemuck",
"cosmic-text",
@ -3404,9 +3325,7 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"as-raw-xcb-connection",
"bitflags 2.11.1",
"bytemuck",
"cosmic-client-toolkit",
@ -3423,19 +3342,16 @@ 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]]
name = "iced_widget"
version = "0.14.2"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"cosmic-client-toolkit",
"dnd",
@ -3455,7 +3371,6 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.14.0"
source = "git+https://github.com/pop-os/libcosmic#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
dependencies = [
"cosmic-client-toolkit",
"cursor-icon",
@ -4565,9 +4480,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#3f9e93067b31d9ba81a4e3a28653b3380c61c352"
name = "libcosmic-yoda"
version = "0.1.0-yoda.2"
dependencies = [
"apply",
"ashpd 0.12.3",
@ -4743,12 +4657,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"
@ -4770,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",
]
@ -4981,7 +4888,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",
]
@ -5113,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",
]
@ -7008,12 +6913,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",
@ -7023,14 +6926,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]]
@ -7351,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",
]
@ -7382,19 +7282,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"
@ -7754,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",
@ -8372,12 +8258,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",
@ -8901,7 +8785,6 @@ dependencies = [
"winit-wayland",
"winit-web",
"winit-win32",
"winit-x11",
]
[[package]]
@ -8952,7 +8835,6 @@ dependencies = [
"smol_str",
"tracing",
"winit-core",
"x11-dl",
"xkbcommon-dl",
]
@ -9070,29 +8952,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"
@ -9223,39 +9082,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"

View file

@ -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/Projets/COSMIC/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/Projets/COSMIC/libcosmic"
[workspace.dependencies.cosmic-config]
git = "https://github.com/pop-os/libcosmic"
path = "/home/lionel/Projets/COSMIC/libcosmic/cosmic-config"
[workspace.dependencies.cosmic-bg-config]
git = "https://github.com/pop-os/cosmic-bg"
@ -69,24 +71,25 @@ 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" }
# 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/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" }
# 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//" }
[patch.'https://github.com/pop-os/cosmic-text.git']
cosmic-text = { path = "../cosmic-text" }
# [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']
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.crates-io]
atspi = { git = "https://github.com/wash2/atspi" }

View file

@ -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",
@ -59,9 +59,9 @@ 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 }
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 }
@ -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"]

View file

@ -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<crate::pages::Message> {
Section::default().view::<Page>(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(&section.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)
})

View file

@ -22,9 +22,9 @@ use crate::pages::desktop::appearance::Roundness;
pub struct PageInner {
pub(crate) config_helper: Option<cosmic_config::Config>,
pub(crate) panel_config: Option<CosmicPanelConfig>,
pub size: Option<PanelSize>,
pub opacity: f32,
pub opacity_changing: bool,
pub size: PanelSize,
pub outputs: Vec<String>,
pub anchors: Vec<String>,
pub backgrounds: Vec<String>,
@ -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();
}

View file

@ -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,

View file

@ -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<crate::pages::Message> {
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<crate::pages::Message> {
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)
})

View file

@ -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::<Vec<_>>();
let shortcuts: Element<LocalMessage> = if bindings.is_empty() {
let shortcuts: Element<ShortcutMessage> = 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()))
}

View file

@ -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<crate::pages::Message> {
}
/// 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<Category> {
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> {
Category::Nav
} else if system::actions().contains(action) {
Category::System
} else if tiling::actions().contains(action) {
Category::WindowTiling
} else {
return None;
})

View file

@ -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::{

View file

@ -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;

View file

@ -206,8 +206,10 @@ pub fn go_next_with_item<'a, Msg: 'static>(
msg_opt: impl Into<Option<Msg>>,
) -> 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())

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -104,6 +104,7 @@ pub async fn load_each_from_path(
) -> Pin<Box<dyn Send + Stream<Item = (PathBuf, RgbaImage, RgbaImage)>>> {
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())

View file

@ -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

View file

@ -7,9 +7,9 @@ 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 = { 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"

View file

@ -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"

View file

@ -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"

View file

@ -7,11 +7,11 @@ 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 = { 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"

View file

@ -185,7 +185,7 @@ pub fn subscription<I: 'static + Hash + Copy + Send + Sync + Debug>(
conn,
},
|Wrapper {
id,
id: _,
has_popup,
conn,
}| {

View file

@ -141,7 +141,7 @@ pub fn subscription<I: Copy + Debug + std::hash::Hash + 'static>(
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,

View file

@ -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"

View file

@ -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])

View file

@ -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"

View file

@ -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/Projets/COSMIC/libcosmic", default-features = false }
numtoa = "1.0.0-alpha1"
rustix = "1.1.3"
tokio = { version = "1.49.0", features = ["process", "rt", "time"] }

View file

@ -8,9 +8,9 @@ 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"
upower_dbus = { git = "https://github.com/pop-os/dbus-settings-bindings" }
upower_dbus = { path = "../../../dbus-settings-bindings/upower" }
zbus = "5.13.2"