feat: single instance support via dbus activation
This commit is contained in:
parent
608b2d9219
commit
8b1a0c95f0
8 changed files with 343 additions and 128 deletions
325
Cargo.lock
generated
325
Cargo.lock
generated
|
|
@ -104,6 +104,54 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.75"
|
||||
|
|
@ -233,11 +281,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "async-executor"
|
||||
version = "1.7.1"
|
||||
version = "1.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de517d5a758a65a16d18d8f605e7a6beed477444cca270116af40fd3cd59d27"
|
||||
checksum = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d"
|
||||
dependencies = [
|
||||
"async-lock 3.1.0",
|
||||
"async-lock 3.1.1",
|
||||
"async-task",
|
||||
"concurrent-queue",
|
||||
"fastrand 2.0.1",
|
||||
|
|
@ -298,14 +346,14 @@ version = "2.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997"
|
||||
dependencies = [
|
||||
"async-lock 3.1.0",
|
||||
"async-lock 3.1.1",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"futures-io",
|
||||
"futures-lite 2.0.1",
|
||||
"parking",
|
||||
"polling 3.3.0",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"slab",
|
||||
"tracing",
|
||||
"waker-fn",
|
||||
|
|
@ -323,9 +371,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "3.1.0"
|
||||
version = "3.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7"
|
||||
checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105"
|
||||
dependencies = [
|
||||
"event-listener 3.1.0",
|
||||
"event-listener-strategy",
|
||||
|
|
@ -345,7 +393,7 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"event-listener 3.1.0",
|
||||
"futures-lite 1.13.0",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
|
|
@ -372,7 +420,7 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"signal-hook-registry",
|
||||
"slab",
|
||||
"windows-sys",
|
||||
|
|
@ -432,7 +480,7 @@ name = "atomicwrites"
|
|||
version = "0.4.2"
|
||||
source = "git+https://github.com/jackpot51/rust-atomicwrites#043ab4859d53ffd3d55334685303d8df39c9f768"
|
||||
dependencies = [
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"tempfile",
|
||||
"windows-sys",
|
||||
]
|
||||
|
|
@ -549,7 +597,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
|
||||
dependencies = [
|
||||
"async-channel 2.1.0",
|
||||
"async-lock 3.1.0",
|
||||
"async-lock 3.1.1",
|
||||
"async-task",
|
||||
"fastrand 2.0.1",
|
||||
"futures-io",
|
||||
|
|
@ -624,7 +672,7 @@ dependencies = [
|
|||
"bitflags 2.4.1",
|
||||
"log",
|
||||
"polling 3.3.0",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"slab",
|
||||
"thiserror",
|
||||
]
|
||||
|
|
@ -636,16 +684,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02"
|
||||
dependencies = [
|
||||
"calloop",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"wayland-backend 0.3.2",
|
||||
"wayland-client 0.31.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.84"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856"
|
||||
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
|
@ -662,6 +710,46 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
|
||||
|
||||
[[package]]
|
||||
name = "cocoa"
|
||||
version = "0.25.0"
|
||||
|
|
@ -719,9 +807,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "color-spantrace"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
|
||||
checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"owo-colors",
|
||||
|
|
@ -735,6 +823,12 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
||||
|
||||
[[package]]
|
||||
name = "colorgrad"
|
||||
version = "0.6.2"
|
||||
|
|
@ -848,10 +942,20 @@ dependencies = [
|
|||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-client-toolkit"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=5faec87#5faec87be0a1fd1d72e99431ac8e6647ff1dfd41"
|
||||
dependencies = [
|
||||
"cosmic-protocols",
|
||||
"smithay-client-toolkit 0.18.0",
|
||||
"wayland-client 0.31.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-comp-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-comp#9a04fa2abdd53cbe4798dcaaf42bea89d8d073d1"
|
||||
source = "git+https://github.com/pop-os/cosmic-comp#18a86925174585d1350aeb74f1d6e98c9694f50a"
|
||||
dependencies = [
|
||||
"input",
|
||||
"serde",
|
||||
|
|
@ -860,7 +964,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"atomicwrites",
|
||||
"calloop",
|
||||
|
|
@ -875,7 +979,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-config-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
|
|
@ -884,7 +988,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-panel-config"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-panel#39add9bead80e54300b6e18f6823a6590b42caad"
|
||||
source = "git+https://github.com/pop-os/cosmic-panel#7c9c9245bce034beefc8efb71fc086ca14337517"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cosmic-config",
|
||||
|
|
@ -895,6 +999,19 @@ dependencies = [
|
|||
"xdg-shell-wrapper-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-protocols"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/cosmic-protocols?rev=5faec87#5faec87be0a1fd1d72e99431ac8e6647ff1dfd41"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"wayland-backend 0.3.2",
|
||||
"wayland-client 0.31.1",
|
||||
"wayland-protocols 0.31.0",
|
||||
"wayland-scanner 0.31.0",
|
||||
"wayland-server",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cosmic-settings"
|
||||
version = "0.1.0"
|
||||
|
|
@ -903,6 +1020,7 @@ dependencies = [
|
|||
"apply",
|
||||
"ashpd 0.6.7",
|
||||
"async-channel 1.9.0",
|
||||
"clap",
|
||||
"color-eyre",
|
||||
"cosmic-comp-config",
|
||||
"cosmic-panel-config",
|
||||
|
|
@ -1012,7 +1130,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cosmic-theme"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"almost",
|
||||
"cosmic-config",
|
||||
|
|
@ -1406,9 +1524,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
|||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
|
||||
checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
|
|
@ -1416,9 +1534,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "etagere"
|
||||
version = "0.2.8"
|
||||
version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fcf22f748754352918e082e0039335ee92454a5d62bcaf69b5e8daf5907d9644"
|
||||
checksum = "306960881d6c46bd0dd6b7f07442a441418c08d0d3e63d8d080b0f64c6343e4e"
|
||||
dependencies = [
|
||||
"euclid",
|
||||
"svg_fmt",
|
||||
|
|
@ -1478,9 +1596,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "eyre"
|
||||
version = "0.6.8"
|
||||
version = "0.6.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
|
||||
checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd"
|
||||
dependencies = [
|
||||
"indenter",
|
||||
"once_cell",
|
||||
|
|
@ -1814,7 +1932,11 @@ version = "2.0.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb"
|
||||
dependencies = [
|
||||
"fastrand 2.0.1",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"memchr",
|
||||
"parking",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
|
|
@ -2198,7 +2320,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"iced_accessibility",
|
||||
"iced_core",
|
||||
|
|
@ -2213,7 +2335,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_accessibility"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"accesskit",
|
||||
"accesskit_unix",
|
||||
|
|
@ -2222,7 +2344,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_core"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"iced_accessibility",
|
||||
|
|
@ -2238,7 +2360,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_futures"
|
||||
version = "0.7.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"iced_core",
|
||||
|
|
@ -2251,7 +2373,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_graphics"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bytemuck",
|
||||
|
|
@ -2269,7 +2391,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_renderer"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"iced_graphics",
|
||||
"iced_tiny_skia",
|
||||
|
|
@ -2282,7 +2404,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_runtime"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"iced_accessibility",
|
||||
"iced_core",
|
||||
|
|
@ -2294,7 +2416,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_sctk"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"enum-repr",
|
||||
"float-cmp",
|
||||
|
|
@ -2318,7 +2440,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_style"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"iced_core",
|
||||
"once_cell",
|
||||
|
|
@ -2328,7 +2450,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_tiny_skia"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"cosmic-text",
|
||||
|
|
@ -2346,7 +2468,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_wgpu"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"bytemuck",
|
||||
|
|
@ -2368,7 +2490,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "iced_widget"
|
||||
version = "0.1.3"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"iced_renderer",
|
||||
"iced_runtime",
|
||||
|
|
@ -2382,9 +2504,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_calendar"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b520c5675775e3838447c33fc55bf558148c6824ef0d20ff7a9e0df7345a281c"
|
||||
checksum = "7eb932a690c92f87955e923106181ee0d5682e688ff37fb5c7b296e1fe806edb"
|
||||
dependencies = [
|
||||
"calendrical_calculations",
|
||||
"displaydoc",
|
||||
|
|
@ -2399,15 +2521,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_calendar_data"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75d8d1a514ca7e6dc547be930f2fd661d578909c07cf1c1adade81c3f7a78840"
|
||||
checksum = "22aec7d032735d9acb256eeef72adcac43c3b7572f19b51576a63d664b524ca2"
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f284eb342dc49d3e9d9f3b188489d76b5d22dfb1d1a5e0d1941811253bac625c"
|
||||
checksum = "5c0aa2536adc14c07e2a521e95512b75ed8ef832f0fdf9299d4a0a45d2be2a9d"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
|
|
@ -2418,9 +2540,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_locid_transform"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6551daf80882d8e68eee186cc19e132d8bde1b1f059a79b93384a5ca0e8fc5e7"
|
||||
checksum = "57c17d8f6524fdca4471101dd71f0a132eb6382b5d6d7f2970441cb25f6f435a"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
|
|
@ -2432,15 +2554,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_locid_transform_data"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a741eba5431f75eb2f1f9022d3cffabcadda6771e54fb4e77c8ba8653e4da44"
|
||||
checksum = "545c6c3e8bf9580e2dafee8de6f9ec14826aaf359787789c7724f1f85f47d3dc"
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68acdef80034b5e35d8524e9817479d389a4f9774f3f0cbe1bf3884d80fd5934"
|
||||
checksum = "ba58e782287eb6950247abbf11719f83f5d4e4a5c1f2cd490d30a334bc47c2f4"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
|
|
@ -2455,9 +2577,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_provider_macros"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2060258edfcfe32ca7058849bf0f146cb5c59aadbedf480333c0d0002f97bc99"
|
||||
checksum = "d2abdd3a62551e8337af119c5899e600ca0c88ec8f23a46c60ba216c803dcf1a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -2466,9 +2588,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_timezone"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19e6401cd210ccda98b2e7fc707831b29c6efe319efbbec460f957b6f331f626"
|
||||
checksum = "b35aabe571a7c653c0f543ff1512b8a1b2ad481cfa24b3d25115298d2ff3b50f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_calendar",
|
||||
|
|
@ -2482,9 +2604,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "icu_timezone_data"
|
||||
version = "1.3.2"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d7e214a653bac59b768c42f82d252f13af95e8a9cb07b6108b8bc723c561b43"
|
||||
checksum = "6ceee21e181cce2ab44e95923da6b3418df75369f570df82264c29c51ca398d4"
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
|
|
@ -2648,7 +2770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
|
|
@ -2767,10 +2889,11 @@ checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
|
|||
[[package]]
|
||||
name = "libcosmic"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/pop-os/libcosmic#448c777812c707717e2c6e4467a6e108aaf57f37"
|
||||
source = "git+https://github.com/pop-os/libcosmic#70d54d6f2071fbcd2ab29045a7945b2bb6bc2f22"
|
||||
dependencies = [
|
||||
"apply",
|
||||
"ashpd 0.5.0",
|
||||
"cosmic-client-toolkit",
|
||||
"cosmic-config",
|
||||
"cosmic-theme",
|
||||
"css-color",
|
||||
|
|
@ -2788,14 +2911,16 @@ dependencies = [
|
|||
"iced_widget",
|
||||
"lazy_static",
|
||||
"palette",
|
||||
"ron",
|
||||
"serde",
|
||||
"slotmap",
|
||||
"smithay-client-toolkit 0.18.0",
|
||||
"taffy",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
"url",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2859,9 +2984,9 @@ checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
|
|||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
version = "0.7.1"
|
||||
version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1"
|
||||
checksum = "f9d642685b028806386b2b6e75685faadd3eb65a85fff7df711ce18446a422da"
|
||||
|
||||
[[package]]
|
||||
name = "locale_config"
|
||||
|
|
@ -2916,9 +3041,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "lyon_algorithms"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00a0349cd8f0270781bb93a824b63df6178e3b4a27794e7be3ce3763f5a44d6e"
|
||||
checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623"
|
||||
dependencies = [
|
||||
"lyon_path",
|
||||
"num-traits",
|
||||
|
|
@ -3616,7 +3741,7 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"pin-project-lite",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"tracing",
|
||||
"windows-sys",
|
||||
]
|
||||
|
|
@ -3978,9 +4103,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.21"
|
||||
version = "0.38.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3"
|
||||
checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e"
|
||||
dependencies = [
|
||||
"bitflags 2.4.1",
|
||||
"errno",
|
||||
|
|
@ -4221,7 +4346,7 @@ dependencies = [
|
|||
"log",
|
||||
"memmap2 0.9.0",
|
||||
"pkg-config",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"thiserror",
|
||||
"wayland-backend 0.3.2",
|
||||
"wayland-client 0.31.1",
|
||||
|
|
@ -4283,7 +4408,7 @@ dependencies = [
|
|||
"objc",
|
||||
"raw-window-handle",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"tiny-xlib",
|
||||
"wasm-bindgen",
|
||||
"wayland-backend 0.3.2",
|
||||
|
|
@ -4478,15 +4603,15 @@ dependencies = [
|
|||
"cfg-if",
|
||||
"fastrand 2.0.1",
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.21",
|
||||
"rustix 0.38.25",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.3.0"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
|
||||
checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
|
@ -4581,9 +4706,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.7.4"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219"
|
||||
checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec",
|
||||
|
|
@ -4720,9 +4845,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.1.4"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2"
|
||||
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
|
|
@ -4731,9 +4856,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.17"
|
||||
version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
|
||||
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
|
||||
dependencies = [
|
||||
"nu-ansi-term",
|
||||
"sharded-slab",
|
||||
|
|
@ -4971,9 +5096,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "utf8-width"
|
||||
version = "0.1.6"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1"
|
||||
checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
|
|
@ -5656,9 +5787,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.5.3"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2"
|
||||
checksum = "dad7bb64b8ef9c0aa27b6da38b452b0ee9fd82beaf276a87dd796fb55cbae14e"
|
||||
|
||||
[[package]]
|
||||
name = "x11rb"
|
||||
|
|
@ -5766,9 +5897,9 @@ checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1"
|
|||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61e38c508604d6bbbd292dadb3c02559aa7fff6b654a078a36217cad871636e4"
|
||||
checksum = "65e71b2e4f287f467794c671e2b8f8a5f3716b3c829079a1c44740148eff07e4"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
|
|
@ -5778,9 +5909,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yoke-derive"
|
||||
version = "0.7.2"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5e19fb6ed40002bab5403ffa37e53e0e56f914a4450c8765f533018db1db35f"
|
||||
checksum = "9e6936f0cce458098a201c245a11bef556c6a0181129c7034d10d76d1ec3a2b8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -5863,18 +5994,18 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
|
|||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.7.25"
|
||||
version = "0.7.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557"
|
||||
checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.7.25"
|
||||
version = "0.7.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b"
|
||||
checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -5904,9 +6035,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerotrie"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9685bb4deb98dab812e87c296a9631fc00d7ca4bc5c2c5f304f375bbed711a8a"
|
||||
checksum = "d0594125a0574fb93059c92c588ab209cc036a23d1baeb3410fa9181bea551a0"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
|
|
@ -5915,9 +6046,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1194130c5b155bf8ae50ab16c86ab758cd695cf9ad176d2f870b744cbdbb572e"
|
||||
checksum = "eff4439ae91fb5c72b8abc12f3f2dbf51bd27e6eadb9f8a5bc8898dddb0e27ea"
|
||||
dependencies = [
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
|
|
@ -5926,9 +6057,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acabf549809064225ff8878baedc4ce3732ac3b07e7c7ce6e5c2ccdbc485c324"
|
||||
checksum = "7b4e5997cbf58990550ef1f0e5124a05e47e1ebd33a84af25739be6031a62c20"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ git = "https://github.com/pop-os/libcosmic"
|
|||
|
||||
[workspace.dependencies.libcosmic]
|
||||
git = "https://github.com/pop-os/libcosmic"
|
||||
features = ["wayland", "tokio"]
|
||||
features = ["wayland", "tokio", "single-instance"]
|
||||
|
||||
[workspace.dependencies.cosmic-config]
|
||||
git = "https://github.com/pop-os/libcosmic"
|
||||
|
|
@ -26,6 +26,9 @@ git = "https://github.com/pop-os/cosmic-panel"
|
|||
# libcosmic = { path = "../libcosmic" }
|
||||
# cosmic-config = { path = "../libcosmic/cosmic-config" }
|
||||
|
||||
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "single-instance" }
|
||||
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "single-instance"}
|
||||
|
||||
[patch."https://github.com/Smithay/client-toolkit"]
|
||||
sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "e63ab5f"}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ serde = { version = "1.0.180", features = ["derive"] }
|
|||
ashpd = "0.6.2"
|
||||
ron = "0.8"
|
||||
static_init = "1.0.3"
|
||||
clap = {version = "4.4.8", features = ["derive"] }
|
||||
|
||||
[dependencies.i18n-embed]
|
||||
version = "0.13.9"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use cosmic::app::DbusActivationDetails;
|
||||
use cosmic::iced::Subscription;
|
||||
use cosmic::{
|
||||
app::{Command, Core},
|
||||
|
|
@ -15,8 +16,10 @@ use cosmic::{
|
|||
};
|
||||
use cosmic_panel_config::CosmicPanelConfig;
|
||||
use cosmic_settings_page::{self as page, section};
|
||||
use page::Entity;
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::PageCommands;
|
||||
|
||||
use crate::pages::desktop::appearance::COLOR_PICKER_DIALOG_ID;
|
||||
use crate::pages::desktop::{
|
||||
|
|
@ -46,6 +49,20 @@ pub struct SettingsApp {
|
|||
search_selections: Vec<(page::Entity, section::Entity)>,
|
||||
}
|
||||
|
||||
impl SettingsApp {
|
||||
fn subcommand_to_page(&self, cmd: PageCommands) -> Option<Entity> {
|
||||
match cmd {
|
||||
// PageCommands::Bluetooth => self.pages.page_id::<system::bluetooth::Page>(),
|
||||
// PageCommands::Network => self.pages.page_id::<system::network::Page>(),
|
||||
// PageCommands::Notifications => self.pages.page_id::<notifications::Page>(),
|
||||
// PageCommands::Power => self.pages.page_id::<system::power::Page>(),
|
||||
PageCommands::Sound => self.pages.page_id::<sound::Page>(),
|
||||
PageCommands::Time => self.pages.page_id::<time::Page>(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Message {
|
||||
|
|
@ -58,11 +75,18 @@ pub enum Message {
|
|||
OpenContextDrawer(Cow<'static, str>),
|
||||
CloseContextDrawer,
|
||||
SetTheme(cosmic::theme::Theme),
|
||||
DbusActivation(DbusActivationDetails<PageCommands, Vec<String>>),
|
||||
}
|
||||
|
||||
impl From<DbusActivationDetails<PageCommands, Vec<String>>> for Message {
|
||||
fn from(msg: DbusActivationDetails<PageCommands, Vec<String>>) -> Self {
|
||||
Message::DbusActivation(msg)
|
||||
}
|
||||
}
|
||||
|
||||
impl cosmic::Application for SettingsApp {
|
||||
type Executor = cosmic::executor::single::Executor;
|
||||
type Flags = ();
|
||||
type Flags = crate::Args;
|
||||
type Message = Message;
|
||||
|
||||
const APP_ID: &'static str = "com.system76.CosmicSettings";
|
||||
|
|
@ -75,7 +99,7 @@ impl cosmic::Application for SettingsApp {
|
|||
&mut self.core
|
||||
}
|
||||
|
||||
fn init(core: Core, _flags: Self::Flags) -> (Self, Command<Self::Message>) {
|
||||
fn init(core: Core, flags: Self::Flags) -> (Self, Command<Self::Message>) {
|
||||
let mut app = SettingsApp {
|
||||
active_page: page::Entity::default(),
|
||||
config: Config::new(),
|
||||
|
|
@ -92,10 +116,14 @@ impl cosmic::Application for SettingsApp {
|
|||
app.insert_page::<time::Page>();
|
||||
app.insert_page::<input::Page>();
|
||||
|
||||
let active_id = app
|
||||
.pages
|
||||
.find_page_by_id(&app.config.active_page)
|
||||
.map_or(desktop_id, |(id, _info)| id);
|
||||
let active_id = match flags.subcommand {
|
||||
Some(p) => app.subcommand_to_page(p),
|
||||
None => app
|
||||
.pages
|
||||
.find_page_by_id(&app.config.active_page)
|
||||
.map(|(id, _info)| id),
|
||||
}
|
||||
.unwrap_or(desktop_id);
|
||||
|
||||
let command = app.activate_page(active_id);
|
||||
|
||||
|
|
@ -321,6 +349,18 @@ impl cosmic::Application for SettingsApp {
|
|||
Message::CloseContextDrawer => {
|
||||
self.core.window.show_context = false;
|
||||
}
|
||||
Message::DbusActivation(msg) => {
|
||||
let mut cmds = Vec::with_capacity(1);
|
||||
|
||||
// if action was passed, use it to change the page
|
||||
if let DbusActivationDetails::ActivateAction { action, .. } = msg {
|
||||
if let Some(p) = self.subcommand_to_page(action) {
|
||||
cmds.push(self.activate_page(p));
|
||||
}
|
||||
}
|
||||
|
||||
return Command::batch(cmds);
|
||||
}
|
||||
}
|
||||
|
||||
Command::none()
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#![allow(clippy::cast_lossless)]
|
||||
|
||||
pub mod app;
|
||||
use std::str::FromStr;
|
||||
|
||||
pub use app::{Message, SettingsApp};
|
||||
pub mod config;
|
||||
|
||||
|
|
@ -18,10 +20,60 @@ pub mod widget;
|
|||
|
||||
pub mod subscription;
|
||||
|
||||
use cosmic::iced::Limits;
|
||||
use clap::{Parser, Subcommand};
|
||||
use cosmic::{app::CosmicFlags, iced::Limits};
|
||||
use i18n_embed::DesktopLanguageRequester;
|
||||
use ron::error::SpannedError;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
#[derive(Parser, Debug, Serialize, Deserialize, Clone)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
#[command(propagate_version = true)]
|
||||
pub struct Args {
|
||||
#[command(subcommand)]
|
||||
subcommand: Option<PageCommands>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug, Serialize, Deserialize, Clone)]
|
||||
pub enum PageCommands {
|
||||
/// Open the settings bluetooth page
|
||||
Bluetooth,
|
||||
/// Open the settings network page
|
||||
Network,
|
||||
/// Open the settings notifications page
|
||||
Notifications,
|
||||
/// Open the settings power page
|
||||
Power,
|
||||
/// Open the settings sound page
|
||||
Sound,
|
||||
/// Open the settings time page
|
||||
Time,
|
||||
}
|
||||
|
||||
impl FromStr for PageCommands {
|
||||
type Err = SpannedError;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
ron::de::from_str(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToString for PageCommands {
|
||||
fn to_string(&self) -> String {
|
||||
ron::ser::to_string(self).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
impl CosmicFlags for Args {
|
||||
type SubCommand = PageCommands;
|
||||
type Args = Vec<String>;
|
||||
|
||||
fn action(&self) -> Option<&PageCommands> {
|
||||
self.subcommand.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns error if iced fails to run the application.
|
||||
|
|
@ -35,10 +87,12 @@ pub fn main() -> color_eyre::Result<()> {
|
|||
init_logger();
|
||||
init_localizer();
|
||||
|
||||
let args = Args::parse();
|
||||
|
||||
let settings = cosmic::app::Settings::default()
|
||||
.size_limits(Limits::NONE.min_width(400.0).min_height(300.0));
|
||||
|
||||
cosmic::app::run::<app::SettingsApp>(settings, ())?;
|
||||
cosmic::app::run_single_instance::<app::SettingsApp>(settings, args)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1040,7 +1040,7 @@ pub fn mode_and_colors() -> Section<crate::pages::Message> {
|
|||
.height(Length::Fixed(100.0))
|
||||
)
|
||||
.style(button::Style::Image)
|
||||
.padding([0, 0])
|
||||
.padding([8, 0])
|
||||
.selected(page.theme_mode.is_dark)
|
||||
.on_press(Message::DarkMode(true)),
|
||||
text(&descriptions[14])
|
||||
|
|
@ -1415,19 +1415,6 @@ fn color_picker_window_settings() -> SctkWindowSettings {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO replace with image button / toggle buttons
|
||||
// fn color_button_<'a, Message: 'a>(
|
||||
// on_press: Option<Message>,
|
||||
// color: cosmic::iced::Color,
|
||||
// selected: bool,
|
||||
// ) -> cosmic::widget::Button<'a, Message, cosmic::Renderer> {
|
||||
// let ret = button(cosmic::widget::vertical_space(Length::Fixed(48.0)))
|
||||
// .width(Length::Fixed(48.0))
|
||||
// .height(Length::Fixed(48.0))
|
||||
// .on_press_maybe(on_press);
|
||||
// color_button(ret, color, selected)
|
||||
// }
|
||||
|
||||
/// A button for selecting a color or gradient.
|
||||
pub fn color_button<'a, Message: 'a + Clone>(
|
||||
on_press: Option<Message>,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use cosmic::widget::{
|
|||
};
|
||||
|
||||
use cosmic::{
|
||||
cctk::sctk::reexports::client::protocol::wl_data_device_manager::DndAction,
|
||||
cosmic_config::{Config, CosmicConfigEntry},
|
||||
iced::{
|
||||
alignment::{Horizontal, Vertical},
|
||||
|
|
@ -33,7 +34,6 @@ use cosmic::{
|
|||
},
|
||||
graphics::image::image_rs::EncodableLayout,
|
||||
},
|
||||
sctk::reexports::client::protocol::wl_data_device_manager::DndAction,
|
||||
theme, Apply, Element,
|
||||
};
|
||||
|
||||
|
|
@ -1124,18 +1124,17 @@ where
|
|||
)
|
||||
},
|
||||
)));
|
||||
let data = match &state.dragging_state {
|
||||
DraggingState::Dragging(a) => Some(a.clone()),
|
||||
_ => {
|
||||
shell.publish((self.on_dnd_command_produced.as_ref())(Box::new(
|
||||
let data = if let DraggingState::Dragging(a) = &state.dragging_state {
|
||||
Some(a.clone())
|
||||
} else {
|
||||
shell.publish((self.on_dnd_command_produced.as_ref())(Box::new(
|
||||
move || {
|
||||
platform_specific::wayland::data_device::ActionInner::RequestDndData(
|
||||
MIME_TYPE.to_string(),
|
||||
)
|
||||
},
|
||||
)));
|
||||
None
|
||||
}
|
||||
None
|
||||
};
|
||||
DndOfferState::HandlingOffer(
|
||||
mime_types.clone(),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use cosmic::{
|
||||
cctk::sctk::reexports::client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy},
|
||||
cosmic_config::{self, CosmicConfigEntry},
|
||||
iced::Length,
|
||||
iced_widget::slider,
|
||||
sctk::reexports::client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy},
|
||||
theme,
|
||||
widget::{
|
||||
button, container, dropdown, horizontal_space, icon, list, row, settings, text, toggler,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue