[workspace]
members = ["cosmic-settings", "page", "pages/*", "subscriptions/*"]
default-members = ["cosmic-settings"]
resolver = "3"

[workspace.package]
rust-version = "1.93"

[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 }

[workspace.dependencies.libcosmic]
features = [
    "dbus-config",
    "desktop",
    "multi-window",
    "winit",
    "tokio",
    "qr_code",
]
git = "https://github.com/pop-os/libcosmic"

[workspace.dependencies.cosmic-config]
git = "https://github.com/pop-os/libcosmic"

[workspace.dependencies.cosmic-bg-config]
git = "https://github.com/pop-os/cosmic-bg"

[workspace.dependencies.cosmic-comp-config]
git = "https://github.com/pop-os/cosmic-comp"
features = ["output"]

[workspace.dependencies.cosmic-idle-config]
git = "https://github.com/pop-os/cosmic-idle"

[workspace.dependencies.cosmic-panel-config]
git = "https://github.com/pop-os/cosmic-panel"

[workspace.dependencies.cosmic-randr-shell]
git = "https://github.com/pop-os/cosmic-randr"

[workspace.dependencies.sctk]
version = "0.20"
package = "smithay-client-toolkit"

[profile.dev]
opt-level = 3
lto = "off"

[profile.release]
opt-level = 3
lto = "thin"
panic = "abort"

[profile.release-with-debug]
inherits = "release"
lto = "off"
debug = true

# [patch.'https://github.com/pop-os/cosmic-text']
# cosmic-text = { git = "https://github.com/pop-os/cosmic-text//", rev = "b017d7c" }

[patch.'https://github.com/pop-os/cosmic-protocols']
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "32283d7" }
cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//", rev = "32283d7" }

# [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" }
# iced_futures = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
# iced_winit = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }

# [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" }

[patch.crates-io]
atspi = { git = "https://github.com/wash2/atspi" }
atspi-common = { git = "https://github.com/wash2/atspi" }
