From 2709dcfee57ebb556a696faeec97d5383bcefe70 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 25 Jan 2023 04:14:49 +0100 Subject: [PATCH] feat: settings application architecture --- .github/workflows/ci.yml | 41 + .gitignore | 10 + .vscode/settings.json | 3 + Cargo.lock | 4116 +++++++++++++++++ Cargo.toml | 25 + LICENSE.md | 595 +++ README.md | 52 + debian/changelog | 5 + debian/control | 21 + debian/copyright | 7 + debian/rules | 27 + debian/source/format | 1 + debian/source/options | 1 + i18n.toml | 4 + i18n/en/cosmic_settings.ftl | 156 + justfile | 104 + resources/com.system76.CosmicSettings.desktop | 11 + rust-toolchain | 1 + src/app.rs | 443 ++ src/localize.rs | 40 + src/main.rs | 37 + src/page/desktop/appearance.rs | 24 + src/page/desktop/dock.rs | 25 + src/page/desktop/mod.rs | 119 + src/page/desktop/notifications.rs | 25 + src/page/desktop/options.rs | 167 + src/page/desktop/wallpaper.rs | 98 + src/page/desktop/workspaces.rs | 84 + src/page/mod.rs | 57 + src/page/model.rs | 211 + src/page/networking/accounts.rs | 11 + src/page/networking/mod.rs | 5 + src/page/networking/wired.rs | 11 + src/page/section.rs | 65 + src/page/sound.rs | 148 + src/page/system/about.rs | 111 + src/page/system/firmware.rs | 25 + src/page/system/mod.rs | 31 + src/page/system/users.rs | 25 + src/page/time/date.rs | 141 + src/page/time/mod.rs | 26 + src/page/time/region.rs | 24 + src/widget/mod.rs | 111 + 43 files changed, 7244 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/options create mode 100644 i18n.toml create mode 100644 i18n/en/cosmic_settings.ftl create mode 100644 justfile create mode 100644 resources/com.system76.CosmicSettings.desktop create mode 100644 rust-toolchain create mode 100644 src/app.rs create mode 100644 src/localize.rs create mode 100644 src/main.rs create mode 100644 src/page/desktop/appearance.rs create mode 100644 src/page/desktop/dock.rs create mode 100644 src/page/desktop/mod.rs create mode 100644 src/page/desktop/notifications.rs create mode 100644 src/page/desktop/options.rs create mode 100644 src/page/desktop/wallpaper.rs create mode 100644 src/page/desktop/workspaces.rs create mode 100644 src/page/mod.rs create mode 100644 src/page/model.rs create mode 100644 src/page/networking/accounts.rs create mode 100644 src/page/networking/mod.rs create mode 100644 src/page/networking/wired.rs create mode 100644 src/page/section.rs create mode 100644 src/page/sound.rs create mode 100644 src/page/system/about.rs create mode 100644 src/page/system/firmware.rs create mode 100644 src/page/system/mod.rs create mode 100644 src/page/system/users.rs create mode 100644 src/page/time/date.rs create mode 100644 src/page/time/mod.rs create mode 100644 src/page/time/region.rs create mode 100644 src/widget/mod.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..500cd78 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Continuous integration + +on: + push: + branches: [master] + pull_request: + +jobs: + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: install toolchain + run: rustup toolchain install stable --component rustfmt + - name: fmt + run: cargo fmt --all --check + + clippy: + name: Clippy Check + runs-on: ubuntu-latest + steps: + - name: install system dependencies + run: sudo apt-get update && sudo apt-get install cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config + - uses: actions/checkout@v3 + - name: install toolchain + run: rustup show + - name: clippy + run: cargo clippy --all-features + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: install system dependencies + run: sudo apt-get update && sudo apt-get install cmake libexpat1-dev libfontconfig-dev libfreetype-dev pkg-config + - uses: actions/checkout@v3 + - name: install toolchain + run: rustup show + - name: test + run: cargo test --all-features diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9cabe5a --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +target +vendor +vendor.tar +.cargo +debian/* +!debian/changelog +!debian/control +!debian/copyright +!debian/rules +!debian/source \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..fd4ea64 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.check.overrideCommand": ["just", "check-json"] +} diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..7cf9bca --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,4116 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" + +[[package]] +name = "ab_glyph" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5568a4aa5ba8adf5175c5c460b030e27d8893412976cc37bef0e4fbc16cfbba" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +dependencies = [ + "memchr", +] + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" + +[[package]] +name = "apply" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f47b57fc4521e3cae26a4d45b5227f8fadee4c345be0fefd8d5d1711afb8aeb9" + +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + +[[package]] +name = "ash" +version = "0.37.2+1.3.238" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28bf19c1f0a470be5fbf7522a308a05df06610252c5bcf5143e1b23f629a9a03" +dependencies = [ + "libloading", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bit_field" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + +[[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "bytemuck" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "calloop" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" +dependencies = [ + "log", + "nix 0.25.1", + "slotmap", + "thiserror", + "vec_map", +] + +[[package]] +name = "cc" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + +[[package]] +name = "clipboard_macos" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" +dependencies = [ + "objc", + "objc-foundation", + "objc_id", +] + +[[package]] +name = "clipboard_wayland" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f6364a9f7a66f2ac1a1a098aa1c7f6b686f2496c6ac5e5c0d773445df912747" +dependencies = [ + "smithay-clipboard", +] + +[[package]] +name = "clipboard_x11" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983a7010836ecd04dde2c6d27a0cb56ec5d21572177e782bdcb24a600124e921" +dependencies = [ + "thiserror", + "x11rb 0.9.0", +] + +[[package]] +name = "cmake" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +dependencies = [ + "cc", +] + +[[package]] +name = "cocoa" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +dependencies = [ + "bitflags", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +dependencies = [ + "bitflags", + "block", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "const_panic" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58baae561b85ca19b3122a9ddd35c8ec40c3bcd14fe89921824eae73f7baffbf" + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "core-graphics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +dependencies = [ + "bitflags", + "core-foundation", + "core-graphics-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags", + "core-foundation", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-text" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "cosmic-settings" +version = "0.1.0" +dependencies = [ + "apply", + "derive_setters", + "i18n-embed", + "i18n-embed-fl", + "libcosmic", + "once_cell", + "regex", + "rust-embed", + "slotmap", +] + +[[package]] +name = "cosmic-text" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5d29bcf58238b07dc456ba16b012513ad1f21eb25dd738fcf833bc4f6a1442" +dependencies = [ + "fontdb 0.10.0", + "libm", + "log", + "ouroboros 0.15.5", + "rangemap", + "rustybuzz 0.6.0", + "swash", + "sys-locale", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", +] + +[[package]] +name = "cosmic-theme" +version = "0.1.0" +source = "git+https://github.com/pop-os/cosmic-theme.git#5c84b81c67a69e3752bc2fdc451f9d49857ceabf" +dependencies = [ + "anyhow", + "csscolorparser", + "directories", + "lazy_static", + "palette", + "ron", + "serde", +] + +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossfont" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" +dependencies = [ + "cocoa", + "core-foundation", + "core-foundation-sys", + "core-graphics", + "core-text", + "dwrote", + "foreign-types 0.5.0", + "freetype-rs", + "libc", + "log", + "objc", + "once_cell", + "pkg-config", + "servo-fontconfig", + "winapi", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csscolorparser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +dependencies = [ + "phf", + "serde", +] + +[[package]] +name = "cty" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" + +[[package]] +name = "d3d12" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" +dependencies = [ + "bitflags", + "libloading", + "winapi", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn", +] + +[[package]] +name = "dashmap" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +dependencies = [ + "cfg-if", + "hashbrown", + "lock_api", + "once_cell", + "parking_lot_core 0.9.6", +] + +[[package]] +name = "data-url" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30bfce702bcfa94e906ef82421f2c0e61c076ad76030c16ee5d2e9a32fe193" +dependencies = [ + "matches", +] + +[[package]] +name = "derive_setters" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1cf41b4580a37cca5ef2ada2cc43cf5d6be3983f4522e83010d67ab6925e84b" +dependencies = [ + "darling 0.10.2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "directories" +version = "4.0.1" +source = "git+https://github.com/edfloreshz/directories-rs#6a6d83d853a35ee3273034215c4defaf61286fe5" +dependencies = [ + "anyhow", + "dirs-sys", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "displaydoc" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dlib" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +dependencies = [ + "libloading", +] + +[[package]] +name = "dlv-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi", + "wio", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "encase" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a516181e9a36e8982cb37933c5e7dba638c42938cacde46ee4e5b4156f881b9" +dependencies = [ + "const_panic", + "encase_derive", + "glam", + "thiserror", +] + +[[package]] +name = "encase_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5b802412eea315f29f2bb2da3a5963cd6121f56eaa06aebcdc0c54eea578f22" +dependencies = [ + "encase_derive_impl", +] + +[[package]] +name = "encase_derive_impl" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2f4de457d974f548d2c2a16f709ebd81013579e543bd1a9b19ced88132c2cf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + +[[package]] +name = "euclid" +version = "0.22.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" +dependencies = [ + "num-traits", +] + +[[package]] +name = "expat-sys" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +dependencies = [ + "cmake", + "pkg-config", +] + +[[package]] +name = "exr" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb5f255b5980bb0c8cf676b675d1a99be40f316881444f44e0462eaf5df5ded" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "smallvec", + "threadpool", +] + +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + +[[package]] +name = "find-crate" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2" +dependencies = [ + "toml", +] + +[[package]] +name = "flate2" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + +[[package]] +name = "fluent" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61f69378194459db76abd2ce3952b790db103ceb003008d3d50d97c41ff847a7" +dependencies = [ + "fluent-bundle", + "unic-langid", +] + +[[package]] +name = "fluent-bundle" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e242c601dec9711505f6d5bbff5bedd4b61b2469f2e8bb8e57ee7c9747a87ffd" +dependencies = [ + "fluent-langneg", + "fluent-syntax", + "intl-memoizer", + "intl_pluralrules", + "rustc-hash", + "self_cell", + "smallvec", + "unic-langid", +] + +[[package]] +name = "fluent-langneg" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94" +dependencies = [ + "unic-langid", +] + +[[package]] +name = "fluent-syntax" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0abed97648395c902868fee9026de96483933faa54ea3b40d652f7dfe61ca78" +dependencies = [ + "thiserror", +] + +[[package]] +name = "flume" +version = "0.10.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "fontdb" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d66551cc28351f0bc6a73da86459ee7765caaad03ce284f2dc36472dbf539cd" +dependencies = [ + "log", + "memmap2 0.3.1", + "ttf-parser 0.12.3", +] + +[[package]] +name = "fontdb" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8131752b3f3b876a20f42b3d08233ad177d6e7ec6d18aaa6954489a201071be5" +dependencies = [ + "log", + "memmap2 0.5.8", + "ttf-parser 0.17.1", +] + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "fraction" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c37ba08fe22fba12a3ada3e479d09a8f7fac6081aa6f5c27f22b78639025031" +dependencies = [ + "lazy_static", + "num", +] + +[[package]] +name = "freedesktop-icons" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e61ac115df4632b592d36b71fda3c259f4c8061c70b7fa429bac145890e880" +dependencies = [ + "dirs", + "once_cell", + "rust-ini", + "thiserror", + "xdg", +] + +[[package]] +name = "freetype-rs" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" +dependencies = [ + "bitflags", + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", +] + +[[package]] +name = "futures" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", + "num_cpus", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "glam" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" + +[[package]] +name = "glow" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow_glyph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4e62c64947b9a24fe20e2bba9ad819ecb506ef5c8df7ffc4737464c6df9510" +dependencies = [ + "bytemuck", + "glow", + "glyph_brush", + "log", +] + +[[package]] +name = "glyph_brush" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac02497410cdb5062cc056a33f2e1e19ff69fbf26a4be9a02bf29d6e17ea105b" +dependencies = [ + "glyph_brush_draw_cache", + "glyph_brush_layout", + "log", + "ordered-float", + "rustc-hash", + "twox-hash", +] + +[[package]] +name = "glyph_brush_draw_cache" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" +dependencies = [ + "ab_glyph", + "crossbeam-channel", + "crossbeam-deque", + "linked-hash-map", + "rayon", + "rustc-hash", +] + +[[package]] +name = "glyph_brush_layout" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" +dependencies = [ + "ab_glyph", + "approx", + "xi-unicode", +] + +[[package]] +name = "gpu-alloc" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" +dependencies = [ + "bitflags", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" +dependencies = [ + "bitflags", +] + +[[package]] +name = "gpu-descriptor" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" +dependencies = [ + "bitflags", + "gpu-descriptor-types", + "hashbrown", +] + +[[package]] +name = "gpu-descriptor-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" +dependencies = [ + "bitflags", +] + +[[package]] +name = "guillotiere" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62d5865c036cb1393e23c50693df631d3f5d7bcca4c04fe4cc0fd592e74a782" +dependencies = [ + "euclid", + "svg_fmt", +] + +[[package]] +name = "half" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" +dependencies = [ + "crunchy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "i18n-config" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d9f93ceee6543011739bc81699b5e0cf1f23f3a80364649b6d80de8636bc8df" +dependencies = [ + "log", + "serde", + "serde_derive", + "thiserror", + "toml", + "unic-langid", +] + +[[package]] +name = "i18n-embed" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2653dd1a8be0726315603f1c180b29f90e5b2a58f8b943d949d5170d9ad81101" +dependencies = [ + "arc-swap", + "fluent", + "fluent-langneg", + "fluent-syntax", + "i18n-embed-impl", + "intl-memoizer", + "lazy_static", + "locale_config", + "log", + "parking_lot 0.12.1", + "rust-embed", + "thiserror", + "unic-langid", + "walkdir", +] + +[[package]] +name = "i18n-embed-fl" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a425b9bbdc2e4cd797a2a79528662cb61894bd36db582e48da2c56c28eb727cd" +dependencies = [ + "dashmap", + "find-crate", + "fluent", + "fluent-syntax", + "i18n-config", + "i18n-embed", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", + "unic-langid", +] + +[[package]] +name = "i18n-embed-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0db2330e035808eb064afb67e6743ddce353763af3e0f2bdfc2476e00ce76136" +dependencies = [ + "find-crate", + "i18n-config", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "iced" +version = "0.6.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_core", + "iced_dyrend", + "iced_futures", + "iced_glow", + "iced_graphics", + "iced_native", + "iced_softbuffer", + "iced_wgpu", + "iced_winit", + "image", + "thiserror", +] + +[[package]] +name = "iced_core" +version = "0.6.2" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "bitflags", + "palette", + "wasm-timer", +] + +[[package]] +name = "iced_dyrend" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_glow", + "iced_graphics", + "iced_native", + "iced_softbuffer", + "iced_wgpu", + "log", + "raw-window-handle 0.5.0", +] + +[[package]] +name = "iced_futures" +version = "0.5.1" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "futures", + "log", + "wasm-bindgen-futures", + "wasm-timer", +] + +[[package]] +name = "iced_glow" +version = "0.5.1" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "bytemuck", + "euclid", + "glow", + "glow_glyph", + "glyph_brush", + "iced_graphics", + "iced_native", + "log", +] + +[[package]] +name = "iced_graphics" +version = "0.5.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "bitflags", + "bytemuck", + "glam", + "iced_native", + "iced_style", + "image", + "kamadak-exif", + "log", + "raw-window-handle 0.5.0", + "resvg", + "thiserror", + "tiny-skia 0.6.6", + "usvg", +] + +[[package]] +name = "iced_lazy" +version = "0.3.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_native", + "ouroboros 0.13.0", +] + +[[package]] +name = "iced_native" +version = "0.7.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_core", + "iced_futures", + "iced_style", + "num-traits", + "twox-hash", + "unicode-segmentation", +] + +[[package]] +name = "iced_softbuffer" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "cosmic-text", + "iced_graphics", + "iced_native", + "lazy_static", + "log", + "raqote", + "raw-window-handle 0.5.0", + "softbuffer", +] + +[[package]] +name = "iced_style" +version = "0.5.1" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_core", + "once_cell", + "palette", +] + +[[package]] +name = "iced_wgpu" +version = "0.7.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "bitflags", + "bytemuck", + "encase", + "futures", + "glam", + "glyph_brush", + "guillotiere", + "iced_graphics", + "iced_native", + "log", + "raw-window-handle 0.5.0", + "wgpu", + "wgpu_glyph", +] + +[[package]] +name = "iced_winit" +version = "0.6.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "iced_futures", + "iced_graphics", + "iced_native", + "log", + "thiserror", + "web-sys", + "winapi", + "window_clipboard", + "winit", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "image" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder 0.3.0", + "num-rational", + "num-traits", + "png", + "scoped_threadpool", + "tiff", +] + +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "intl-memoizer" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c310433e4a310918d6ed9243542a6b83ec1183df95dff8f23f87bb88a264a66f" +dependencies = [ + "type-map", + "unic-langid", +] + +[[package]] +name = "intl_pluralrules" +version = "7.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078ea7b7c29a2b4df841a7f6ac8775ff6074020c6776d48491ce2268e068f972" +dependencies = [ + "unic-langid", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jpeg-decoder" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" + +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +dependencies = [ + "rayon", +] + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "kamadak-exif" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077" +dependencies = [ + "mutate_once", +] + +[[package]] +name = "khronos-egl" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] + +[[package]] +name = "kurbo" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb348d766edbac91ba1eb83020d96f4f8867924d194393083c15a51f185e6a82" +dependencies = [ + "arrayvec 0.5.2", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] +name = "libc" +version = "0.2.139" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "libcosmic" +version = "0.1.0" +source = "git+https://github.com/pop-os/libcosmic?branch=settings-improv#b49b0e20624ac07d1c8b0aca65aee96bfa6c622d" +dependencies = [ + "apply", + "cosmic-theme", + "derive_setters", + "fraction", + "freedesktop-icons", + "iced", + "iced_core", + "iced_lazy", + "iced_native", + "iced_style", + "iced_winit", + "lazy_static", + "palette", + "slotmap", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libm" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "locale_config" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d2c35b16f4483f6c26f0e4e9550717a2f6575bcd6f12a53ff0c490a94a6934" +dependencies = [ + "lazy_static", + "objc", + "objc-foundation", + "regex", + "winapi", +] + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "lyon_geom" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d89ccbdafd83d259403e22061be27bccc3254bba65cdc5303250c4227c8c8e" +dependencies = [ + "arrayvec 0.5.2", + "euclid", + "num-traits", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memmap2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" +dependencies = [ + "libc", +] + +[[package]] +name = "memmap2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "metal" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" +dependencies = [ + "bitflags", + "block", + "core-graphics-types", + "foreign-types 0.3.2", + "log", + "objc", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.42.0", +] + +[[package]] +name = "mutate_once" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" + +[[package]] +name = "naga" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" +dependencies = [ + "bit-set", + "bitflags", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "num-traits", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + +[[package]] +name = "ndk" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +dependencies = [ + "bitflags", + "jni-sys", + "ndk-sys", + "num_enum", + "raw-window-handle 0.5.0", + "thiserror", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-glue" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" +dependencies = [ + "libc", + "log", + "ndk", + "ndk-context", + "ndk-macro", + "ndk-sys", + "once_cell", + "parking_lot 0.12.1", +] + +[[package]] +name = "ndk-macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" +dependencies = [ + "darling 0.13.4", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ndk-sys" +version = "0.4.1+23.1.7779620" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "nix" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", + "static_assertions", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +dependencies = [ + "memchr", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", + "objc_exception", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + +[[package]] +name = "once_cell" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" + +[[package]] +name = "ordered-float" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84eb1409416d254e4a9c8fa56cc24701755025b458f0fcd8e59e1f5f40c23bf" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown", +] + +[[package]] +name = "ouroboros" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f357ef82d1b4db66fbed0b8d542cbd3c22d0bf5b393b3c257b9ba4568e70c9c3" +dependencies = [ + "aliasable", + "ouroboros_macro 0.13.0", + "stable_deref_trait", +] + +[[package]] +name = "ouroboros" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbb50b356159620db6ac971c6d5c9ab788c9cc38a6f49619fca2a27acb062ca" +dependencies = [ + "aliasable", + "ouroboros_macro 0.15.5", +] + +[[package]] +name = "ouroboros_macro" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44a0b52c2cbaef7dffa5fec1a43274afe8bd2a644fa9fc50a9ef4ff0269b1257" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0d9d1a6191c4f391f87219d1ea42b23f09ee84d64763cd05ee6ea88d9f384d" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a5f3c7ca08b6879e7965fb25e24d1f5eeb32ea73f9ad99b3854778a38c57e93" +dependencies = [ + "ttf-parser 0.18.1", +] + +[[package]] +name = "palette" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f9cd68f7112581033f157e56c77ac4a5538ec5836a2e39284e65bd7d7275e49" +dependencies = [ + "approx", + "num-traits", + "palette_derive", + "phf", + "serde", +] + +[[package]] +name = "palette_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05eedf46a8e7c27f74af0c9cfcdb004ceca158cb1b918c6f68f8d7a549b3e427" +dependencies = [ + "find-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.6", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "windows-sys 0.42.0", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "phf" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "png" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +dependencies = [ + "bitflags", + "crc32fast", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" + +[[package]] +name = "quick-xml" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "range-alloc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" + +[[package]] +name = "rangemap" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9283c6b06096b47afc7109834fdedab891175bb5241ee5d4f7d2546549f263" + +[[package]] +name = "raqote" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5b6cb89f8be6a645e5834f3ad44a7960d12343d97b5b7fb07cb0365ae36aa2d" +dependencies = [ + "euclid", + "lyon_geom", + "sw-composite", + "typed-arena", +] + +[[package]] +name = "raw-window-handle" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28f55143d0548dad60bb4fbdc835a3d7ac6acc3324506450c5fdd6e42903a76" +dependencies = [ + "libc", + "raw-window-handle 0.4.3", +] + +[[package]] +name = "raw-window-handle" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" +dependencies = [ + "cty", +] + +[[package]] +name = "raw-window-handle" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" +dependencies = [ + "cty", +] + +[[package]] +name = "rayon" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + +[[package]] +name = "rctree" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae028b272a6e99d9f8260ceefa3caa09300a8d6c8d2b2001316474bc52122e9" + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb02a9aee8e8c7ad8d86890f1e16b49e0bbbffc9961ff3788c31d57c98bcbf03" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "renderdoc-sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" + +[[package]] +name = "resvg" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608c6e8aa6fb2c13bc06e4184d7c7b2cc1b7c138f88a539da8be55c3c033d7f4" +dependencies = [ + "jpeg-decoder 0.1.22", + "log", + "pico-args", + "png", + "rgb", + "svgfilters", + "tiny-skia 0.6.6", + "usvg", +] + +[[package]] +name = "rgb" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3603b7d71ca82644f79b5a06d1220e9a58ede60bd32255f698cb1af8838b8db3" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "ron" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" +dependencies = [ + "base64", + "bitflags", + "serde", +] + +[[package]] +name = "roxmltree" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "921904a62e410e37e215c40381b7117f830d9d89ba60ab5236170541dd25646b" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "rust-embed" +version = "6.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "283ffe2f866869428c92e0d61c2f35dfb4355293cdfdc48f49e895c15f1333d1" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "6.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ab23d42d71fb9be1b643fe6765d292c5e14d46912d13f3ae2815ca048ea04d" +dependencies = [ + "proc-macro2", + "quote", + "rust-embed-utils", + "syn", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "7.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1669d81dfabd1b5f8e2856b8bbe146c6192b0ba22162edc738ac0a5de18f054" +dependencies = [ + "sha2", + "walkdir", +] + +[[package]] +name = "rust-ini" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustybuzz" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44561062e583c4873162861261f16fd1d85fe927c4904d71329a4fe43dc355ef" +dependencies = [ + "bitflags", + "bytemuck", + "smallvec", + "ttf-parser 0.12.3", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-general-category 0.4.0", + "unicode-script", +] + +[[package]] +name = "rustybuzz" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab9e34ecf6900625412355a61bda0bd68099fe674de707c67e5e4aed2c05e489" +dependencies = [ + "bitflags", + "bytemuck", + "libm", + "smallvec", + "ttf-parser 0.17.1", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-general-category 0.6.0", + "unicode-script", +] + +[[package]] +name = "safe_arch" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scoped_threadpool" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sctk-adwaita" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +dependencies = [ + "crossfont", + "log", + "smithay-client-toolkit", + "tiny-skia 0.7.0", +] + +[[package]] +name = "self_cell" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" + +[[package]] +name = "serde" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "servo-fontconfig" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" +dependencies = [ + "libc", + "servo-fontconfig-sys", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" +dependencies = [ + "expat-sys", + "freetype-sys", + "pkg-config", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "simplecss" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a11be7c62927d9427e9f40f3444d5499d868648e2edbc4e2116de69e7ec0e89d" +dependencies = [ + "log", +] + +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slotmap" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "smithay-client-toolkit" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +dependencies = [ + "bitflags", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2 0.5.8", + "nix 0.24.3", + "pkg-config", + "wayland-client 0.29.5", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "smithay-clipboard" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a345c870a1fae0b1b779085e81b51e614767c239e93503588e54c5b17f4b0e8" +dependencies = [ + "smithay-client-toolkit", + "wayland-client 0.29.5", +] + +[[package]] +name = "softbuffer" +version = "0.2.0" +source = "git+https://github.com/pop-os/softbuffer?rev=8dcb6438b#8dcb6438b6c1688a0015b477dfa76c6c0bee3318" +dependencies = [ + "bytemuck", + "cfg_aliases", + "cocoa", + "core-graphics", + "fastrand", + "foreign-types 0.3.2", + "log", + "nix 0.26.2", + "objc", + "raw-window-handle 0.5.0", + "redox_syscall 0.3.4", + "thiserror", + "wasm-bindgen", + "wayland-backend", + "wayland-client 0.30.0", + "wayland-sys 0.30.1", + "web-sys", + "windows-sys 0.42.0", + "x11-dl", + "x11rb 0.11.1", +] + +[[package]] +name = "spin" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spirv" +version = "0.2.0+1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +dependencies = [ + "bitflags", + "num-traits", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "svg_fmt" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2" + +[[package]] +name = "svgfilters" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "639abcebc15fdc2df179f37d6f5463d660c1c79cd552c12343a4600827a04bce" +dependencies = [ + "float-cmp", + "rgb", +] + +[[package]] +name = "svgtypes" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22975e8a2bac6a76bb54f898a6b18764633b00e780330f0b689f65afb3975564" +dependencies = [ + "siphasher", +] + +[[package]] +name = "sw-composite" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8d4f1dd38540e3f62c393ae78e874c94491c403025368183b018e3fb098b1f" + +[[package]] +name = "swash" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb18e5888a9b5f0a89ea3ebdf6883dc479347ca9183b6c51a8f9cf2041f23a0" +dependencies = [ + "yazi", + "zeno", +] + +[[package]] +name = "syn" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sys-locale" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3358acbb4acd4146138b9bda219e904a6bb5aaaa237f8eed06f4d6bc1580ecee" +dependencies = [ + "js-sys", + "libc", + "wasm-bindgen", + "web-sys", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "tiff" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +dependencies = [ + "flate2", + "jpeg-decoder 0.3.0", + "weezl", +] + +[[package]] +name = "tiny-skia" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d049bfef0eaa2521e75d9ffb5ce86ad54480932ae19b85f78bec6f52c4d30d78" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "bytemuck", + "cfg-if", + "png", + "safe_arch", +] + +[[package]] +name = "tiny-skia" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "bytemuck", + "cfg-if", + "png", + "safe_arch", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", +] + +[[package]] +name = "tinystr" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ac3f5b6856e931e15e07b478e98c8045239829a65f9156d4fa7e7788197a5ef" +dependencies = [ + "displaydoc", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" + +[[package]] +name = "toml_edit" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "729bfd096e40da9c001f778f5cdecbd2957929a24e10e5883d9392220a751581" +dependencies = [ + "indexmap", + "nom8", + "toml_datetime", +] + +[[package]] +name = "ttf-parser" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ae2f58a822f08abdaf668897e96a5656fe72f5a9ce66422423e8849384872e6" + +[[package]] +name = "ttf-parser" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" + +[[package]] +name = "ttf-parser" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609f771ad9c6155384897e1df4d948e692667cc0588548b68eb44d052b27633" + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "rand", + "static_assertions", +] + +[[package]] +name = "type-map" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d3364c5e96cb2ad1603037ab253ddd34d7fb72a58bdddf4b7350760fc69a46" +dependencies = [ + "rustc-hash", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "unic-langid" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "398f9ad7239db44fd0f80fe068d12ff22d78354080332a5077dc6f52f14dcf2f" +dependencies = [ + "unic-langid-impl", +] + +[[package]] +name = "unic-langid-impl" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35bfd2f2b8796545b55d7d3fd3e89a0613f68a0d1c8bc28cb7ff96b411a35ff" +dependencies = [ + "serde", + "tinystr", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" + +[[package]] +name = "unicode-bidi-mirroring" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" + +[[package]] +name = "unicode-ccc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" + +[[package]] +name = "unicode-general-category" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742" + +[[package]] +name = "unicode-general-category" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2281c8c1d221438e373249e065ca4989c4c36952c211ff21a0ee91c44a3869e7" + +[[package]] +name = "unicode-ident" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unicode-linebreak" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" +dependencies = [ + "hashbrown", + "regex", +] + +[[package]] +name = "unicode-script" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc" + +[[package]] +name = "unicode-segmentation" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "usvg" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4058e0bd091a56f905e6963e40776ce6880b271275f0b493bff951433e303071" +dependencies = [ + "base64", + "data-url", + "flate2", + "float-cmp", + "fontdb 0.6.2", + "kurbo", + "log", + "pico-args", + "rctree", + "roxmltree", + "rustybuzz 0.4.0", + "simplecss", + "siphasher", + "svgtypes", + "ttf-parser 0.12.3", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "wasm-timer" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +dependencies = [ + "futures", + "js-sys", + "parking_lot 0.11.2", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wayland-backend" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb23bfea266c92bb051ea36cce0eb1a52b743dc1c5f168021947eda79764656d" +dependencies = [ + "cc", + "downcast-rs", + "io-lifetimes", + "nix 0.26.2", + "scoped-tls", + "smallvec", + "wayland-sys 0.30.1", +] + +[[package]] +name = "wayland-client" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix 0.24.3", + "scoped-tls", + "wayland-commons", + "wayland-scanner 0.29.5", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-client" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a925bd68c8b652af4e6f11a32410bd31bf84061c5ef279ed081520c60f203b4" +dependencies = [ + "bitflags", + "nix 0.26.2", + "wayland-backend", + "wayland-scanner 0.30.0", +] + +[[package]] +name = "wayland-commons" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +dependencies = [ + "nix 0.24.3", + "once_cell", + "smallvec", + "wayland-sys 0.29.5", +] + +[[package]] +name = "wayland-cursor" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +dependencies = [ + "nix 0.24.3", + "wayland-client 0.29.5", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +dependencies = [ + "bitflags", + "wayland-client 0.29.5", + "wayland-commons", + "wayland-scanner 0.29.5", +] + +[[package]] +name = "wayland-scanner" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-scanner" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4834c14b3edf1d9986c83ca79b1e7e3afbe9874c7c144702f6467063259ce45d" +dependencies = [ + "proc-macro2", + "quick-xml", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.29.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + +[[package]] +name = "wayland-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +dependencies = [ + "dlib", + "lazy_static", + "log", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "weezl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" + +[[package]] +name = "wgpu" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f643110d228fd62a60c5ed2ab56c4d5b3704520bd50561174ec4ec74932937" +dependencies = [ + "arrayvec 0.7.2", + "js-sys", + "log", + "naga", + "parking_lot 0.12.1", + "raw-window-handle 0.5.0", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6000d1284ef8eec6076fd5544a73125fd7eb9b635f18dceeb829d826f41724ca" +dependencies = [ + "arrayvec 0.7.2", + "bit-vec", + "bitflags", + "cfg_aliases", + "codespan-reporting", + "fxhash", + "log", + "naga", + "parking_lot 0.12.1", + "profiling", + "raw-window-handle 0.5.0", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.2", + "ash", + "bit-set", + "bitflags", + "block", + "core-graphics-types", + "d3d12", + "foreign-types 0.3.2", + "fxhash", + "glow", + "gpu-alloc", + "gpu-descriptor", + "js-sys", + "khronos-egl", + "libloading", + "log", + "metal", + "naga", + "objc", + "parking_lot 0.12.1", + "profiling", + "range-alloc", + "raw-window-handle 0.5.0", + "renderdoc-sys", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" +dependencies = [ + "bitflags", +] + +[[package]] +name = "wgpu_glyph" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cafb82773e0f124a33674dab5de4dff73175aeb921949047ab014efb58fb446" +dependencies = [ + "bytemuck", + "glyph_brush", + "log", + "wgpu", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window_clipboard" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "015dd4474dc6aa96fe19aae3a24587a088bd90331dba5a5cc60fb3a180234c4d" +dependencies = [ + "clipboard-win", + "clipboard_macos", + "clipboard_wayland", + "clipboard_x11", + "raw-window-handle 0.3.4", + "thiserror", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + +[[package]] +name = "winit" +version = "0.27.2" +source = "git+https://github.com/pop-os/winit.git?branch=iced#d35712bba65eb1dad8f6f546af49b96fdad9467e" +dependencies = [ + "bitflags", + "cocoa", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk", + "ndk-glue", + "objc", + "once_cell", + "parking_lot 0.12.1", + "percent-encoding", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", + "sctk-adwaita", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client 0.29.5", + "wayland-protocols", + "web-sys", + "windows-sys 0.36.1", + "x11-dl", +] + +[[package]] +name = "wio" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" +dependencies = [ + "winapi", +] + +[[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.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" +dependencies = [ + "gethostname", + "nix 0.22.3", + "winapi", + "winapi-wsapoll", +] + +[[package]] +name = "x11rb" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf3c79412dd91bae7a7366b8ad1565a85e35dd049affc3a6a2c549e97419617" +dependencies = [ + "gethostname", + "libc", + "libloading", + "nix 0.25.1", + "once_cell", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b1513b141123073ce54d5bb1d33f801f17508fbd61e02060b1214e96d39c56" +dependencies = [ + "nix 0.25.1", +] + +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom", +] + +[[package]] +name = "xdg" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4583db5cbd4c4c0303df2d15af80f0539db703fa1c68802d4cbbd2dd0f88f6" +dependencies = [ + "dirs", +] + +[[package]] +name = "xi-unicode" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" + +[[package]] +name = "xml-rs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + +[[package]] +name = "xmlparser" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" + +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[package]] +name = "yazi" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03b3e19c937b5b9bd8e52b1c88f30cce5c0d33d676cf174866175bb794ff658" + +[[package]] +name = "zeno" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c110ba09c9b3a43edd4803d570df0da2414fed6e822e22b976a4e3ef50860701" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c739218 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "cosmic-settings" +version = "0.1.0" +edition = "2021" +license = "GPL-3.0-only" +rust-version = "1.65.0" + +[dependencies] +apply = "0.3.0" +derive_setters = "0.1.5" +i18n-embed-fl = "0.6.5" +once_cell = "1.17.0" +regex = "1.7.1" +rust-embed = "6.4.2" +slotmap = "1.0.6" + +[dependencies.i18n-embed] +version = "0.13.8" +features = ["fluent-system", "desktop-requester"] + +[dependencies.libcosmic] +git = "https://github.com/pop-os/libcosmic" +branch = "settings-improv" +default-features = false +features = ["debug", "winit", "dyrend"] \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..1110e89 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,595 @@ +GNU General Public License +========================== + +_Version 3, 29 June 2007_ +_Copyright © 2007 Free Software Foundation, Inc. <>_ + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + +## Preamble + +The GNU General Public License is a free, copyleft license for software and other +kinds of works. + +The licenses for most software and other practical works are designed to take away +your freedom to share and change the works. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change all versions of a +program--to make sure it remains free software for all its users. We, the Free +Software Foundation, use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General +Public Licenses are designed to make sure that you have the freedom to distribute +copies of free software (and charge for them if you wish), that you receive source +code or can get it if you want it, that you can change the software or use pieces of +it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or +asking you to surrender the rights. Therefore, you have certain responsibilities if +you distribute copies of the software, or if you modify it: responsibilities to +respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, +you must pass on to the recipients the same freedoms that you received. You must make +sure that they, too, receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: **(1)** assert +copyright on the software, and **(2)** offer you this License giving you legal permission +to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is +no warranty for this free software. For both users' and authors' sake, the GPL +requires that modified versions be marked as changed, so that their problems will not +be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of +the software inside them, although the manufacturer can do so. This is fundamentally +incompatible with the aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we have designed +this version of the GPL to prohibit the practice for those products. If such problems +arise substantially in other domains, we stand ready to extend this provision to +those domains in future versions of the GPL, as needed to protect the freedom of +users. + +Finally, every program is threatened constantly by software patents. States should +not allow patents to restrict development and use of software on general-purpose +computers, but in those that do, we wish to avoid the special danger that patents +applied to a free program could make it effectively proprietary. To prevent this, the +GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in +a fashion requiring copyright permission, other than the making of an exact copy. The +resulting work is called a “modified version” of the earlier work or a +work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on +the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for infringement under +applicable copyright law, except executing it on a computer or modifying a private +copy. Propagation includes copying, distribution (with or without modification), +making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through a computer +network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the +extent that it includes a convenient and prominently visible feature that **(1)** +displays an appropriate copyright notice, and **(2)** tells the user that there is no +warranty for the work (except to the extent that warranties are provided), that +licensees may convey the work under this License, and how to view a copy of this +License. If the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work for +making modifications to it. “Object code” means any non-source form of a +work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of interfaces +specified for a particular programming language, one that is widely used among +developers working in that language. + +The “System Libraries” of an executable work include anything, other than +the work as a whole, that **(a)** is included in the normal form of packaging a Major +Component, but which is not part of that Major Component, and **(b)** serves only to +enable use of the work with that Major Component, or to implement a Standard +Interface for which an implementation is available to the public in source code form. +A “Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system (if any) on which +the executable work runs, or a compiler used to produce the work, or an object code +interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the +source code needed to generate, install, and (for an executable work) run the object +code and to modify the work, including scripts to control those activities. However, +it does not include the work's System Libraries, or general-purpose tools or +generally available free programs which are used unmodified in performing those +activities but which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for the work, and +the source code for shared libraries and dynamically linked subprograms that the work +is specifically designed to require, such as by intimate data communication or +control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate +automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of copyright on the +Program, and are irrevocable provided the stated conditions are met. This License +explicitly affirms your unlimited permission to run the unmodified Program. The +output from running a covered work is covered by this License only if the output, +given its content, constitutes a covered work. This License acknowledges your rights +of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without +conditions so long as your license otherwise remains in force. You may convey covered +works to others for the sole purpose of having them make modifications exclusively +for you, or provide you with facilities for running those works, provided that you +comply with the terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for you must do so +exclusively on your behalf, under your direction and control, on terms that prohibit +them from making any copies of your copyrighted material outside their relationship +with you. + +Conveying under any other circumstances is permitted solely under the conditions +stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological measure under any +applicable law fulfilling obligations under article 11 of the WIPO copyright treaty +adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention +of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of +technological measures to the extent such circumvention is effected by exercising +rights under this License with respect to the covered work, and you disclaim any +intention to limit operation or modification of the work as a means of enforcing, +against the work's users, your or third parties' legal rights to forbid circumvention +of technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you receive it, in any +medium, provided that you conspicuously and appropriately publish on each copy an +appropriate copyright notice; keep intact all notices stating that this License and +any non-permissive terms added in accord with section 7 apply to the code; keep +intact all notices of the absence of any warranty; and give all recipients a copy of +this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer +support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to produce it from +the Program, in the form of source code under the terms of section 4, provided that +you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified it, and giving a +relevant date. +* **b)** The work must carry prominent notices stating that it is released under this +License and any conditions added under section 7. This requirement modifies the +requirement in section 4 to “keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this License to anyone who +comes into possession of a copy. This License will therefore apply, along with any +applicable section 7 additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no permission to license the +work in any other way, but it does not invalidate such permission if you have +separately received it. +* **d)** If the work has interactive user interfaces, each must display Appropriate Legal +Notices; however, if the Program has interactive interfaces that do not display +Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are +not by their nature extensions of the covered work, and which are not combined with +it such as to form a larger program, in or on a volume of a storage or distribution +medium, is called an “aggregate” if the compilation and its resulting +copyright are not used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work in an aggregate +does not cause this License to apply to the other parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms of sections 4 and +5, provided that you also convey the machine-readable Corresponding Source under the +terms of this License, in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by the Corresponding Source fixed on a +durable physical medium customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product (including a +physical distribution medium), accompanied by a written offer, valid for at least +three years and valid for as long as you offer spare parts or customer support for +that product model, to give anyone who possesses the object code either **(1)** a copy of +the Corresponding Source for all the software in the product that is covered by this +License, on a durable physical medium customarily used for software interchange, for +a price no more than your reasonable cost of physically performing this conveying of +source, or **(2)** access to copy the Corresponding Source from a network server at no +charge. +* **c)** Convey individual copies of the object code with a copy of the written offer to +provide the Corresponding Source. This alternative is allowed only occasionally and +noncommercially, and only if you received the object code with such an offer, in +accord with subsection 6b. +* **d)** Convey the object code by offering access from a designated place (gratis or for +a charge), and offer equivalent access to the Corresponding Source in the same way +through the same place at no further charge. You need not require recipients to copy +the Corresponding Source along with the object code. If the place to copy the object +code is a network server, the Corresponding Source may be on a different server +(operated by you or a third party) that supports equivalent copying facilities, +provided you maintain clear directions next to the object code saying where to find +the Corresponding Source. Regardless of what server hosts the Corresponding Source, +you remain obligated to ensure that it is available for as long as needed to satisfy +these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided you inform +other peers where the object code and Corresponding Source of the work are being +offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the +Corresponding Source as a System Library, need not be included in conveying the +object code work. + +A “User Product” is either **(1)** a “consumer product”, which +means any tangible personal property which is normally used for personal, family, or +household purposes, or **(2)** anything designed or sold for incorporation into a +dwelling. In determining whether a product is a consumer product, doubtful cases +shall be resolved in favor of coverage. For a particular product received by a +particular user, “normally used” refers to a typical or common use of +that class of product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected to use, the +product. A product is a consumer product regardless of whether the product has +substantial commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install and execute +modified versions of a covered work in that User Product from a modified version of +its Corresponding Source. The information must suffice to ensure that the continued +functioning of the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for +use in, a User Product, and the conveying occurs as part of a transaction in which +the right of possession and use of the User Product is transferred to the recipient +in perpetuity or for a fixed term (regardless of how the transaction is +characterized), the Corresponding Source conveyed under this section must be +accompanied by the Installation Information. But this requirement does not apply if +neither you nor any third party retains the ability to install modified object code +on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to +continue to provide support service, warranty, or updates for a work that has been +modified or installed by the recipient, or for the User Product in which it has been +modified or installed. Access to a network may be denied when the modification itself +materially and adversely affects the operation of the network or violates the rules +and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with +this section must be in a format that is publicly documented (and with an +implementation available to the public in source code form), and must require no +special password or key for unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. Additional +permissions that are applicable to the entire Program shall be treated as though they +were included in this License, to the extent that they are valid under applicable +law. If additional permissions apply only to part of the Program, that part may be +used separately under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any +additional permissions from that copy, or from any part of it. (Additional +permissions may be written to require their own removal in certain cases when you +modify the work.) You may place additional permissions on material, added by you to a +covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a +covered work, you may (if authorized by the copyright holders of that material) +supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the terms of +sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or author +attributions in that material or in the Appropriate Legal Notices displayed by works +containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that +modified versions of such material be marked in reasonable ways as different from the +original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or authors of the +material; or +* **e)** Declining to grant rights under trademark law for use of some trade names, +trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that material by anyone +who conveys the material (or modified versions of it) with contractual assumptions of +liability to the recipient, for any liability that these contractual assumptions +directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you received +it, or any part of it, contains a notice stating that it is governed by this License +along with a term that is a further restriction, you may remove that term. If a +license document contains a further restriction but permits relicensing or conveying +under this License, you may add to a covered work material governed by the terms of +that license document, provided that the further restriction does not survive such +relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in +the relevant source files, a statement of the additional terms that apply to those +files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a +separately written license, or stated as exceptions; the above requirements apply +either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly provided under +this License. Any attempt otherwise to propagate or modify it is void, and will +automatically terminate your rights under this License (including any patent licenses +granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a +particular copyright holder is reinstated **(a)** provisionally, unless and until the +copyright holder explicitly and finally terminates your license, and **(b)** permanently, +if the copyright holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently +if the copyright holder notifies you of the violation by some reasonable means, this +is the first time you have received notice of violation of this License (for any +work) from that copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of +parties who have received copies or rights from you under this License. If your +rights have been terminated and not permanently reinstated, you do not qualify to +receive new licenses for the same material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or run a copy of the +Program. Ancillary propagation of a covered work occurring solely as a consequence of +using peer-to-peer transmission to receive a copy likewise does not require +acceptance. However, nothing other than this License grants you permission to +propagate or modify any covered work. These actions infringe copyright if you do not +accept this License. Therefore, by modifying or propagating a covered work, you +indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically receives a license +from the original licensors, to run, modify and propagate that work, subject to this +License. You are not responsible for enforcing compliance by third parties with this +License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an organization, or +merging organizations. If propagation of a covered work results from an entity +transaction, each party to that transaction who receives a copy of the work also +receives whatever licenses to the work the party's predecessor in interest had or +could give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if the predecessor +has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or +affirmed under this License. For example, you may not impose a license fee, royalty, +or other charge for exercise of rights granted under this License, and you may not +initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging +that any patent claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The work thus +licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or +controlled by the contributor, whether already acquired or hereafter acquired, that +would be infringed by some manner, permitted by this License, of making, using, or +selling its contributor version, but do not include claims that would be infringed +only as a consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant patent +sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license +under the contributor's essential patent claims, to make, use, sell, offer for sale, +import and otherwise run, modify and propagate the contents of its contributor +version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent (such as an +express permission to practice a patent or covenant not to sue for patent +infringement). To “grant” such a patent license to a party means to make +such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the +Corresponding Source of the work is not available for anyone to copy, free of charge +and under the terms of this License, through a publicly available network server or +other readily accessible means, then you must either **(1)** cause the Corresponding +Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner consistent with +the requirements of this License, to extend the patent license to downstream +recipients. “Knowingly relying” means you have actual knowledge that, but +for the patent license, your conveying the covered work in a country, or your +recipient's use of the covered work in a country, would infringe one or more +identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you +convey, or propagate by procuring conveyance of, a covered work, and grant a patent +license to some of the parties receiving the covered work authorizing them to use, +propagate, modify or convey a specific copy of the covered work, then the patent +license you grant is automatically extended to all recipients of the covered work and +works based on it. + +A patent license is “discriminatory” if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on the +non-exercise of one or more of the rights that are specifically granted under this +License. You may not convey a covered work if you are a party to an arrangement with +a third party that is in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties who would receive +the covered work from you, a discriminatory patent license **(a)** in connection with +copies of the covered work conveyed by you (or copies made from those copies), or **(b)** +primarily for and in connection with specific products or compilations that contain +the covered work, unless you entered into that arrangement, or that patent license +was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied +license or other defenses to infringement that may otherwise be available to you +under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot convey a covered work so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not convey it at all. For example, if you +agree to terms that obligate you to collect a royalty for further conveying from +those to whom you convey the Program, the only way you could satisfy both those terms +and this License would be to refrain entirely from conveying the Program. + +### 13. Use with the GNU Affero General Public License + +Notwithstanding any other provision of this License, you have permission to link or +combine any covered work with a work licensed under version 3 of the GNU Affero +General Public License into a single combined work, and to convey the resulting work. +The terms of this License will continue to apply to the part which is the covered +work, but the special requirements of the GNU Affero General Public License, section +13, concerning interaction through a network will apply to the combination as such. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of the GNU +General Public License from time to time. Such new versions will be similar in spirit +to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that +a certain numbered version of the GNU General Public License “or any later +version” applies to it, you have the option of following the terms and +conditions either of that numbered version or of any later version published by the +Free Software Foundation. If the Program does not specify a version number of the GNU +General Public License, you may choose any version ever published by the Free +Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU +General Public License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no +additional obligations are imposed on any author or copyright holder as a result of +your choosing to follow a later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE +QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS +PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, +INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE +WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided above cannot be +given local legal effect according to their terms, reviewing courts shall apply local +law that most closely approximates an absolute waiver of all civil liability in +connection with the Program, unless a warranty or assumption of liability accompanies +a copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to +the public, the best way to achieve this is to make it free software which everyone +can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them +to the start of each source file to most effectively state the exclusion of warranty; +and each file should have at least the “copyright” line and a pointer to +where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short notice like this +when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands `show w` and `show c` should show the appropriate parts of +the General Public License. Of course, your program's commands might be different; +for a GUI interface, you would use an “about box”. + +You should also get your employer (if you work as a programmer) or school, if any, to +sign a “copyright disclaimer” for the program, if necessary. For more +information on this, and how to apply and follow the GNU GPL, see +<>. + +The GNU General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider it +more useful to permit linking proprietary applications with the library. If this is +what you want to do, use the GNU Lesser General Public License instead of this +License. But first, please read +<>. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b1b860 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# COSMIC Settings + +> Prototype of a proof of concept that is an active work in progress. + +The settings application for the [COSMIC desktop environment](https://github.com/pop-os/cosmic-epoch). Developed with [libcosmic](https://github.com/pop-os/libcosmic) in the [iced](https://iced.rs/) GUI library. + +## Build + +To compile, a stable Rust compiler and [just](https://github.com/casey/just) are required. + +- cargo +- just + +Some C libraries are also required for font support at the moment. + +- cmake +- libexpat1-dev +- libfontconfig-dev +- libfreetype-dev +- pkg-config + +Then it can be compiled and installed like so. + +```sh +just build-release +sudo just prefix=/usr install +``` + +If you are packaging for Linux distribution, you can use the `rootdir` variable to change the root path, in addition to the prefix. + +```sh +just rootdir=debian/cosmic-settings prefix=/usr install +``` + +## Translators + +Translation files may be found in the [i18n directory](./i18n). New translations may copy the [English (en) localization](./i18n/en) of the project and rename `en` to the desired [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). Translations may be submitted through GitHub as an issue or pull request. Submissions by email or other means are also acceptable; with the preferred name and email to associate with the changes. + +## License + +Licensed under the [GNU Public License 3.0](https://choosealicense.com/licenses/gpl-3.0). + + + +### Contribution + +Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the GNU Public License 3.0 (GPL-3.0). Each source file should have a SPDX copyright notice at the top of the file: + +``` +// Copyright {year-created} System76 +// SPDX-License-Identifier: GPL-3.0-only +``` diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..fde597a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +cosmic-settings (0.1.0) jammy; urgency=medium + + * Project in development + + -- Michael Murphy Wed, 25 Jan 2023 16:27:38 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..e45bee7 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: cosmic-settings +Section: utils +Priority: optional +Maintainer: Michael Murphy +Build-Depends: + debhelper-compat (=13), + just, + cargo, + cmake, + libexpat1-dev, + libfontconfig-dev, + libfreetype-dev, + pkg-config, +Standards-Version: 4.6.2 +Homepage: https://github.com/pop-os/cosmic-settings + +Package: cosmic-settings +Architecture: amd64 arm64 +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Settings application for the COSMIC desktop environment + Settings application for the COSMIC desktop environment diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b701859 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cosmic-settings +Upstream-Contact: Michael Murphy +Source: https://github.com/pop-os/cosmic-settings +Files: * +Copyright: System76 +License: GPL-3.0 \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4339c4a --- /dev/null +++ b/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f + +export DESTDIR = debian/cosmic-settings +export VENDOR ?= 1 +CLEAN ?= 1 + +%: + dh $@ + +override_dh_auto_clean: + if test "${CLEAN}" = "1"; then \ + cargo clean; \ + fi + + if ! ischroot && test "${VENDOR}" = "1"; then \ + mkdir -p .cargo; \ + cargo vendor | head -n -1 > .cargo/config; \ + echo 'directory = "vendor"' >> .cargo/config; \ + tar pcf vendor.tar vendor; \ + rm -rf vendor; \ + fi + +override_dh_auto_build: + just x86-64-target=x86-64-v2 build-vendored + +override_dh_auto_install: + just rootdir=$(DESTDIR) install diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..9f67427 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) \ No newline at end of file diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..d332d16 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +tar-ignore = ".github .vscode vendor target" \ No newline at end of file diff --git a/i18n.toml b/i18n.toml new file mode 100644 index 0000000..05c50ba --- /dev/null +++ b/i18n.toml @@ -0,0 +1,4 @@ +fallback_language = "en" + +[fluent] +assets_dir = "i18n" \ No newline at end of file diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl new file mode 100644 index 0000000..20f361d --- /dev/null +++ b/i18n/en/cosmic_settings.ftl @@ -0,0 +1,156 @@ +app = COSMIC Settings + +## Desktop + +desktop = Desktop + +## Desktop: Appearance + +appearance = Appearance + .desc = Accent colors and COSMIC theming. + +## Desktop: Dock & Panel + +dock = Dock & Top Panel + .desc = Customize size, positions, and more for Dock and Top Panel. + +## Desktop: Notifications + +notifications = Notifications + .desc = Do Not Disturb, lockscreen notifications, and per-application settings. + + +## Desktop: Options + +desktop-options = Desktop Options + .desc = Super Key action, hot corners, window control options. + +super-key-action = Super Key Action + .launcher = Launcher + .workspaces = Workspaces + .applications = Applications + +hot-corner = Hot Corner + .top-left-corner = Enable top-left hot corner for Workspaces + +top-panel = Top Panel + .workspaces = Show Workspaces Button + .applications = Show Applications Button + +window-controls = Window Controls + .minimize = Show Minimize Button + .maximize = Show Maximize Button + +## Desktop: Wallpaper + +wallpaper = Wallpaper + .desc = Background images, colors, and slideshow options. + .same = Same background on all displays + .fit = Background fit + .slide = Slideshow + .change = Change image every + + +## Desktop: Workspaces + +workspaces = Workspaces + .desc = Set workspace number, behavior, and placement. + +workspaces-behavior = Workspace Behavior + .dynamic = Dynamic workspaces + .fixed = Fixed Number of Workspaces + +workspaces-multi-behavior = Multi-monitor Behavior + .span = Workspaces Span Displays + .separate = Displays Have Separate Workspaces + +## Networking: Wired + +wired = Wired + .desc = Wired connection, connection profiles + +## Networking: Online Accounts + +online-accounts = Online Accounts + .desc = Add accounts, IMAP and SMTP, enterprise logins + +## Time & Language + +time = Time & Language + .desc = N/A + +time-date = Date & Time + .desc = Time zone, automatic clock settings, and some time formatting. + .auto = Set automatically + +time-zone = Time Zone + .auto = Automatic time zone + .auto-info = Requires location services and internet access + +time-format = Date & Time Format + .twenty-four = 24-hour time + .first = First day of week + +time-region = Region & Language + .desc = Format dates, times, and numbers based on your region + +## Sound + +sound = Sound + .desc = N/A + +sound-output = Output + .volume = Output volume + .device = Output device + .level = Output level + .config = Configuration + .balance = Balance + +sound-input = Input + .volume = Input volume + .device = Input device + .level = Input level + +sound-alerts = Alerts + .volume = Alerts volume + .sound = Alerts sound + +sound-applications = Applications + .desc = Application volumes and settings + +## System + +system = System & Accounts + +## System: About + +about = About + .desc = Device name, hardware information, operating system defaults. + +about-device = Device name + +about-hardware = Hardware + .model = Hardware model + .memory = Memory + .processor = Processor + .graphics = Graphics + .disk-capacity = Disk Capacity + +about-os = Operating System + .os = Operating system + .os-architecture = Operating system architecture + .desktop-environment = Desktop environment + .windowing-system = Windowing system + +about-related = Related settings + .support = Get support + +## System: Firmware + +firmware = Firmware + .desc = Firmware details. + +## System: Users + +users = Users + .desc = Authentication and login, lock screen. \ No newline at end of file diff --git a/justfile b/justfile new file mode 100644 index 0000000..26e4877 --- /dev/null +++ b/justfile @@ -0,0 +1,104 @@ +name := 'cosmic-settings' +appid := 'com.system76.CosmicSettings' + +arch := `uname -m` + +# Choose x86-64-v2, v3, or v4 for packaging +x86-64-target := 'native' + +export RUSTFLAGS := if arch == 'x86_64' { + '-C target-cpu=' + x86-64-target +} else { + '' +} + +rootdir := '' +prefix := '/usr' + +# File paths +bin-src := 'target/release/' + name +bin-dest := rootdir + prefix + '/bin/' + name + +desktop := appid + '.desktop' +desktop-src := 'resources/' + desktop +desktop-dest := rootdir + prefix + '/share/applications/' + desktop + +help: + @echo '{{name}} ({{appid}})' + @echo 'RUSTFLAGS={{RUSTFLAGS}}' + @echo 'prefix={{prefix}}' + @just -l + +# Remove Cargo build artifacts +clean: + cargo clean + +# Also remove .cargo and vendored dependencies +clean-dist: clean + rm -rf .cargo vendor vendor.tar target + +# Run the application for testing purposes +run: + cargo run --release + +# Compile debug build of cosmic-settings +build-debug *args: + cargo build {{args}} + +# Compile release build of cosmic-settings +build-release *args: (build-debug '--release' args) + +# Vendored release build of cosmic-settings +build-vendored *args: _vendor-extract (build-release '--frozen --offline' args) + +# Run `cargo clippy` +check *args: + cargo clippy --all-features {{args}} -- -W clippy::pedantic + +# Run `cargo clippy` with json message format +check-json: (check '--message-format=json') + +# Run `cargo test` +test: + cargo test --all-features + +# Installation command +_install options src dest: + install {{options}} {{src}} {{dest}} + +_install-bin src dest: (_install '-Dm0755' src dest) +_install-file src dest: (_install '-Dm0644' src dest) + +# Install everything +install: (_install-bin bin-src bin-dest) (_install-file desktop-src desktop-dest) + +# Uninstalls everything (requires same arguments as given to install) +uninstall: + rm -rf {{bin-dest}} {{desktop-dest}} + +# Vendor Cargo dependencies locally +vendor: + mkdir -p .cargo + cargo vendor --sync Cargo.toml \ + | head -n -1 > .cargo/config + echo 'directory = "vendor"' >> .cargo/config + tar pcf vendor.tar vendor + rm -rf vendor + +# Extracts vendored dependencies if vendor=1 +_vendor-extract: + #!/usr/bin/env sh + rm -rf vendor + tar pxf vendor.tar + +# Show the name of the project +name: + @cargo pkgid | sed -e 's:.*/::' -e 's:[#^].*::' + +# Show the current version +version: + @cargo pkgid | sed -e 's:.*/::' -e 's:.*#::' + +# Show the current git commit +git-rev: + @git rev-parse --short HEAD diff --git a/resources/com.system76.CosmicSettings.desktop b/resources/com.system76.CosmicSettings.desktop new file mode 100644 index 0000000..b993d57 --- /dev/null +++ b/resources/com.system76.CosmicSettings.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Cosmic Settings +Type=Application +Exec=cosmic-settings +Terminal=false +Categories=GNOME;GTK; +Keywords=Gnome;GTK; +OnlyShowIn=GNOME;Unity;COSMIC +Icon=org.gnome.Settings +StartupNotify=true +NoDisplay=true \ No newline at end of file diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..870bbe4 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +stable \ No newline at end of file diff --git a/src/app.rs b/src/app.rs new file mode 100644 index 0000000..c8955e5 --- /dev/null +++ b/src/app.rs @@ -0,0 +1,443 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use apply::Apply; + +use cosmic::{ + iced::widget::{self, column, container, horizontal_space, row}, + iced::{self, Application, Command, Length, Subscription}, + iced_native::{subscription, window}, + iced_winit::window::{close, drag, minimize, toggle_maximize}, + keyboard_nav, + theme::Theme, + widget::{ + header_bar, nav_bar, nav_bar_toggle, scrollable, search, segmented_button, settings, + IconSource, + }, + Element, ElementExt, +}; + +use crate::{ + page::{self, desktop, section, sound, system, time, Page}, + widget::{page_title, parent_page_button, search_header, sub_page_button}, +}; + +#[allow(clippy::struct_excessive_bools)] +#[allow(clippy::module_name_repetitions)] +pub struct SettingsApp { + pub active_page: page::Entity, + pub config: Config, + pub debug: bool, + pub is_condensed: bool, + pub nav_bar_toggled_condensed: bool, + pub nav_bar_toggled: bool, + pub nav_bar: segmented_button::SingleSelectModel, + pub pages: page::Model, + pub scaling_factor: f32, + pub search: search::Model, + pub search_selections: Vec<(page::Entity, section::Entity)>, + pub show_maximize: bool, + pub show_minimize: bool, + pub theme: Theme, + pub title: String, + pub window_width: u32, +} + +#[derive(Debug, Default)] +pub struct Config { + nav_page: &'static str, +} + +#[allow(dead_code)] +#[derive(Clone, Debug)] +pub enum Message { + Close, + Desktop(desktop::Message), + DateAndTime(time::date::Message), + Drag, + KeyboardNav(keyboard_nav::Message), + Maximize, + Minimize, + NavBar(segmented_button::Entity), + Search(search::Message), + ToggleNavBar, + ToggleNavBarCondensed, + WindowResize(u32, u32), + Page(page::Entity), +} + +impl Application for SettingsApp { + type Executor = iced::executor::Default; + type Flags = (); + type Message = Message; + type Theme = Theme; + + fn new(_flags: ()) -> (Self, Command) { + let mut app = SettingsApp { + active_page: page::Entity::default(), + config: Config { + nav_page: "desktop", + }, + debug: false, + is_condensed: false, + nav_bar: segmented_button::Model::default(), + nav_bar_toggled: true, + nav_bar_toggled_condensed: false, + pages: page::Model::default(), + title: crate::fl!("app"), + scaling_factor: std::env::var("COSMIC_SCALE") + .ok() + .and_then(|scale| scale.parse::().ok()) + .unwrap_or(1.0), + search: search::Model::default(), + search_selections: Vec::default(), + show_maximize: true, + show_minimize: true, + theme: Theme::Dark, + window_width: 0, + }; + + // app.insert_page::(); + // app.insert_page::(); + // app.insert_page::(); + + app.insert_page::(); + + // app.insert_page::(); + + // app.insert_page::(); + // app.insert_page::(); + + app.insert_page::(); + + // app.insert_page::(); + // app.insert_page::(); + + app.insert_page::(); + app.insert_page::(); + + // app.insert_page::(); + // app.insert_page::(); + + app.activate_navbar(app.active_page); + + (app, Command::none()) + } + + fn title(&self) -> String { + self.title.clone() + } + + fn subscription(&self) -> Subscription { + let window_break = subscription::events_with(|event, _| match event { + iced::Event::Window(_window_id, window::Event::Resized { width, height }) => { + Some(Message::WindowResize(width, height)) + } + _ => None, + }); + + Subscription::batch(vec![ + window_break, + keyboard_nav::subscription().map(Message::KeyboardNav), + ]) + } + + fn update(&mut self, message: Message) -> iced::Command { + let mut ret = Command::none(); + match message { + Message::WindowResize(width, _height) => { + let break_point = (600.0 * self.scaling_factor) as u32; + self.window_width = width; + self.is_condensed = self.window_width < break_point; + } + Message::KeyboardNav(message) => match message { + keyboard_nav::Message::Unfocus => ret = keyboard_nav::unfocus(), + keyboard_nav::Message::FocusNext => ret = widget::focus_next(), + keyboard_nav::Message::FocusPrevious => ret = widget::focus_previous(), + keyboard_nav::Message::Escape => { + if self.search.is_active() { + self.search.state = search::State::Inactive; + self.search_clear(); + } + } + keyboard_nav::Message::Search => { + return self.search.focus(); + } + }, + Message::Page(page) => self.activate_page(page), + Message::Drag => return drag(window::Id::new(0)), + Message::Close => return close(window::Id::new(0)), + Message::Minimize => return minimize(window::Id::new(0), true), + Message::Maximize => return toggle_maximize(window::Id::new(0)), + Message::NavBar(key) => { + if let Some(page) = self.nav_bar.data::(key).copied() { + self.activate_page(page); + } + } + Message::ToggleNavBar => self.nav_bar_toggled = !self.nav_bar_toggled, + Message::ToggleNavBarCondensed => { + self.nav_bar_toggled_condensed = !self.nav_bar_toggled_condensed; + } + Message::Search(search::Message::Activate) => { + return self.search.focus(); + } + Message::Search(search::Message::Changed(phrase)) => { + self.search_changed(phrase); + } + Message::Search(search::Message::Clear) => { + self.search_clear(); + } + Message::Search(_) => {} + Message::Desktop(message) => { + if let Some(model) = self.pages.resource_mut::() { + model.update(message); + } + } + Message::DateAndTime(message) => { + if let Some(model) = self.pages.resource_mut::() { + model.update(message); + } + } + } + ret + } + + #[allow(clippy::too_many_lines)] + fn view(&self) -> Element { + let start = std::time::Instant::now(); + let (nav_bar_message, nav_bar_toggled) = if self.is_condensed { + ( + Message::ToggleNavBarCondensed, + self.nav_bar_toggled_condensed, + ) + } else { + (Message::ToggleNavBar, self.nav_bar_toggled) + }; + + let mut header = header_bar() + .title("") + .on_close(Message::Close) + .on_drag(Message::Drag) + .start( + iced::widget::row!( + nav_bar_toggle() + .on_nav_bar_toggled(nav_bar_message) + .nav_bar_active(nav_bar_toggled), + search::search(&self.search, Message::Search) + ) + .align_items(iced::Alignment::Center) + .into(), + ); + + if self.show_maximize { + header = header.on_maximize(Message::Maximize); + } + + if self.show_minimize { + header = header.on_minimize(Message::Minimize); + } + + let header = Into::>::into(header).debug(self.debug); + + let mut widgets = Vec::with_capacity(2); + + if nav_bar_toggled { + let mut nav_bar = nav_bar(&self.nav_bar, Message::NavBar); + + if !self.is_condensed { + nav_bar = nav_bar.max_width(300); + } + + let nav_bar: Element<_> = nav_bar.into(); + widgets.push(nav_bar.debug(self.debug)); + } + + if !(self.is_condensed && nav_bar_toggled) { + widgets.push( + scrollable(row![ + horizontal_space(Length::Fill), + (if self.search.is_active() { + self.search_view() + } else if let Some(sub_pages) = self.pages.sub_pages(self.active_page) { + self.sub_page_view(sub_pages) + } else if let Some(content) = self.pages.content(self.active_page) { + self.page_view(content) + } else { + panic!("page without sub-pages or content"); + }) + .debug(self.debug), + horizontal_space(Length::Fill), + ]) + .into(), + ); + } + + let content = container(row(widgets)) + .padding([0, 8, 8, 8]) + .width(Length::Fill) + .height(Length::Fill) + .into(); + + eprintln!( + "view: {:?}", + std::time::Instant::now().duration_since(start) + ); + + column(vec![header, content]).into() + } + + fn theme(&self) -> Theme { + self.theme + } + + fn scale_factor(&self) -> f64 { + self.scaling_factor as f64 + } +} + +impl SettingsApp { + /// Activates a page. + fn activate_page(&mut self, page: page::Entity) { + self.nav_bar_toggled_condensed = false; + self.active_page = page; + + self.search_clear(); + self.search.state = search::State::Inactive; + self.activate_navbar(page); + } + + /// Activates the navbar item associated with a page. + fn activate_navbar(&mut self, mut page: page::Entity) { + if let Some(parent) = self.pages.pages[page].parent { + page = parent; + } + + if let Some(nav_id) = self.pages.data(page) { + self.nav_bar.activate(*nav_id); + } + } + + /// Adds a main page to the settings application. + fn insert_page(&mut self) -> page::Insert { + let id = self.pages.register::

().id(); + + self.navbar_insert(id); + + if P::PERSISTENT_ID == self.config.nav_page { + self.active_page = id; + } + + page::Insert { + model: &mut self.pages, + id, + } + } + + fn navbar_insert(&mut self, id: page::Entity) -> segmented_button::SingleSelectEntityMut { + let page = &self.pages.pages[id]; + + self.nav_bar + .insert() + .text(page.title.clone()) + .icon(IconSource::from(page.icon_name)) + .data(id) + .with_id(|nav_id| self.pages.data_set(id, nav_id)) + } + + /// Displays the view of a page. + fn page_view(&self, content: &[section::Entity]) -> cosmic::Element { + let page = &self.pages.pages[self.active_page]; + + let mut column_widgets = Vec::with_capacity(1); + + if let Some(parent) = page.parent { + column_widgets.push(parent_page_button( + &self.pages.pages[parent], + page, + Message::Page(parent), + )); + } + + column_widgets.reserve_exact(1 + content.len()); + for id in content.iter().copied() { + let section = &self.pages.sections[id]; + column_widgets.push((section.view_fn)(self, section)); + } + + settings::view_column(column_widgets).into() + } + + fn search_changed(&mut self, phrase: String) { + // If the text was cleared, clear the search results too. + if phrase.is_empty() { + self.search_clear(); + return; + } + + // Create a case-insensitive regular expression for the search function. + let search_expression = regex::RegexBuilder::new(&phrase) + .case_insensitive(true) + .unicode(true) + .ignore_whitespace(true) + .size_limit(16 * 1024) + .build(); + + if let Ok(expression) = search_expression { + // With the new search expression, generate new search results. + let results: Vec<_> = self.pages.search(&expression).collect(); + + // Use the results if results were found. + if !results.is_empty() { + self.search_selections = results; + } + } + + self.search.phrase = phrase; + } + + /// Clears the search results so that the search page will not be shown. + fn search_clear(&mut self) { + self.search_selections.clear(); + self.search.phrase.clear(); + } + + /// Displays the search view. + fn search_view(&self) -> cosmic::Element { + let mut sections: Vec> = Vec::new(); + + let mut current_page = page::Entity::default(); + for (page, section) in self.search_selections.iter().copied() { + let section = &self.pages.sections[section]; + + if page != current_page { + current_page = page; + sections.push(search_header(&self.pages, page)); + } + + let section = (section.view_fn)(self, section) + .apply(iced::widget::container) + .padding([0, 0, 0, 48]); + + sections.push(section.into()); + } + + settings::view_column(sections).into() + } + + /// Displays the sub-pages view of a page. + fn sub_page_view(&self, sub_pages: &[page::Entity]) -> cosmic::Element { + let page = &self.pages.pages[self.active_page]; + + let mut column_widgets = Vec::with_capacity(sub_pages.len()); + column_widgets.push(page_title(page)); + + for entity in sub_pages.iter().copied() { + let sub_page = &self.pages.pages[entity]; + column_widgets.push(sub_page_button(entity, sub_page)); + } + + settings::view_column(column_widgets) + .apply(Element::from) + .map(Message::Page) + } +} diff --git a/src/localize.rs b/src/localize.rs new file mode 100644 index 0000000..263c17f --- /dev/null +++ b/src/localize.rs @@ -0,0 +1,40 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use i18n_embed::{ + fluent::{fluent_language_loader, FluentLanguageLoader}, + DefaultLocalizer, LanguageLoader, Localizer, +}; +use once_cell::sync::Lazy; +use rust_embed::RustEmbed; + +#[derive(RustEmbed)] +#[folder = "i18n/"] +struct Localizations; + +pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { + let loader: FluentLanguageLoader = fluent_language_loader!(); + + loader + .load_fallback_language(&Localizations) + .expect("Error while loading fallback language"); + + loader +}); + +#[macro_export] +macro_rules! fl { + ($message_id:literal) => {{ + i18n_embed_fl::fl!($crate::localize::LANGUAGE_LOADER, $message_id) + }}; + + ($message_id:literal, $($args:expr),*) => {{ + i18n_embed_fl::fl!($crate::localize::LANGUAGE_LOADER, $message_id, $($args), *) + }}; +} + +// Get the `Localizer` to be used for localizing this library. +#[must_use] +pub fn localizer() -> Box { + Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations)) +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..5435bc3 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,37 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +#![allow(clippy::cast_precision_loss)] +#![allow(clippy::cast_sign_loss)] +#![allow(clippy::cast_possible_truncation)] +#![allow(clippy::cast_lossless)] + +pub mod app; +pub use app::{Message, SettingsApp}; + +#[macro_use] +pub mod localize; + +pub mod widget; + +pub mod page; + +use cosmic::{iced::Application, settings}; +use i18n_embed::DesktopLanguageRequester; + +/// # Errors +/// +/// Returns error if iced fails to run the application. +pub fn main() -> cosmic::iced::Result { + let localizer = crate::localize::localizer(); + let requested_languages = DesktopLanguageRequester::requested_languages(); + + if let Err(error) = localizer.select(&requested_languages) { + eprintln!("error while loading fluent localizations: {}", error); + } + + settings::set_default_icon_theme("Pop"); + let mut settings = settings(); + settings.window.min_size = Some((600, 300)); + SettingsApp::run(settings) +} diff --git a/src/page/desktop/appearance.rs b/src/page/desktop/appearance.rs new file mode 100644 index 0000000..9ace7e1 --- /dev/null +++ b/src/page/desktop/appearance.rs @@ -0,0 +1,24 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page::{self, section, Content, Section}; +use slotmap::SlotMap; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "appearance"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("appearance")) + .description(fl!("appearance", "desc")) + .icon_name("preferences-pop-desktop-appearance-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/page/desktop/dock.rs b/src/page/desktop/dock.rs new file mode 100644 index 0000000..ecc6eb7 --- /dev/null +++ b/src/page/desktop/dock.rs @@ -0,0 +1,25 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "dock"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("dock")) + .description(fl!("dock", "desc")) + .icon_name("preferences-pop-desktop-dock-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/page/desktop/mod.rs b/src/page/desktop/mod.rs new file mode 100644 index 0000000..cc2b741 --- /dev/null +++ b/src/page/desktop/mod.rs @@ -0,0 +1,119 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +pub mod appearance; +pub mod dock; +pub mod notifications; +pub mod options; +pub mod wallpaper; +pub mod workspaces; + +use crate::page; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "desktop"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("desktop")) + .icon_name("video-display-symbolic") + } + + fn sub_pages(page: page::Insert) -> page::Insert { + page.sub_page::() + .sub_page::() + .sub_page::() + .sub_page::() + .sub_page::() + .sub_page::() + } +} + +#[derive(Clone, Copy, Debug)] +pub enum Message { + Slideshow(bool), + SameBackground(bool), + ShowWorkspacesButton(bool), + ShowApplicationsButton(bool), + ShowMinimizeButton(bool), + ShowMaximizeButton(bool), + TopLeftHotCorner(bool), +} + +#[derive(Debug, Default)] +#[allow(clippy::struct_excessive_bools)] +pub struct Model { + pub top_left_hot_corner: bool, + pub show_workspaces_button: bool, + pub show_applications_button: bool, + pub show_minimize_button: bool, + pub show_maximize_button: bool, + pub slideshow: bool, + pub same_background: bool, +} + +impl Model { + pub fn update(&mut self, message: Message) { + match message { + Message::SameBackground(value) => self.same_background = value, + Message::ShowApplicationsButton(value) => self.show_applications_button = value, + Message::ShowMaximizeButton(value) => self.show_maximize_button = value, + Message::ShowMinimizeButton(value) => self.show_minimize_button = value, + Message::ShowWorkspacesButton(value) => self.show_workspaces_button = value, + Message::Slideshow(value) => self.slideshow = value, + Message::TopLeftHotCorner(value) => self.top_left_hot_corner = value, + } + } +} + +// impl From for Message { +// fn from(page: Page) -> Message { +// Message::Page(page) +// } +// } + +// pub enum Output { +// Page(Page), +// } + +// impl SubPage for DesktopPage { +// //TODO: translate +// fn title(&self) -> &'static str { +// use DesktopPage::*; +// match self { +// Workspaces => "Workspaces", +// Notifications => "Notifications", +// } +// } + +// //TODO: translate +// fn description(&self) -> &'static str { +// use DesktopPage::*; +// match self { +// Workspaces => "Set workspace number, behavior, and placement.", +// Notifications => { +// "Do Not Disturb, lockscreen notifications, and per-application settings." +// } +// } +// } + +// fn icon_name(&self) -> &'static str { +// use DesktopPage::*; +// match self { +// Workspaces => "preferences-pop-desktop-workspaces-symbolic", +// Notifications => "preferences-system-notifications-symbolic", +// } +// } + +// fn parent_page(&self) -> Page { +// Page::Desktop(None) +// } + +// fn into_page(self) -> Page { +// Page::Desktop(Some(self)) +// } +// } diff --git a/src/page/desktop/notifications.rs b/src/page/desktop/notifications.rs new file mode 100644 index 0000000..f2e6f74 --- /dev/null +++ b/src/page/desktop/notifications.rs @@ -0,0 +1,25 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "notifications"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("notifications")) + .description(fl!("notifications", "desc")) + .icon_name("preferences-system-notifications-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/page/desktop/options.rs b/src/page/desktop/options.rs new file mode 100644 index 0000000..ed8ee17 --- /dev/null +++ b/src/page/desktop/options.rs @@ -0,0 +1,167 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use super::Message; +use apply::Apply; +use cosmic::{ + iced::widget::horizontal_space, + iced::Length, + widget::{settings, toggler}, + Element, +}; + +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "desktop-options"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("desktop-options")) + .description(fl!("desktop-options", "desc")) + .icon_name("video-display-symbolic") + } + + #[allow(clippy::too_many_lines)] + fn content(sections: &mut SlotMap) -> Option { + Some(vec![ + sections.insert(super_key_action()), + sections.insert(hot_corner()), + sections.insert(top_panel()), + sections.insert(window_controls()), + ]) + } +} + +pub fn hot_corner() -> Section { + Section::new() + .title(fl!("hot-corner")) + .descriptions(vec![fl!("hot-corner", "top-left-corner")]) + .view_fn(|app, section| { + let desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + let descriptions = §ion.descriptions; + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + toggler(None, desktop.top_left_hot_corner, |value| { + Message::TopLeftHotCorner(value) + }), + )) + .apply(Element::from) + .map(crate::Message::Desktop) + }) +} + +pub fn super_key_action() -> Section { + Section::new() + .title(fl!("super-key-action")) + .descriptions(vec![ + fl!("super-key-action", "launcher"), + fl!("super-key-action", "workspaces"), + fl!("super-key-action", "applications"), + ]) + .view_fn(|app, section| { + let _desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + horizontal_space(Length::Fill), + )) + .add(settings::item( + &descriptions[1], + horizontal_space(Length::Fill), + )) + .add(settings::item( + &descriptions[2], + horizontal_space(Length::Fill), + )) + .into() + }) +} + +pub fn top_panel() -> Section { + Section::new() + .title(fl!("top-panel")) + .descriptions(vec![ + fl!("top-panel", "workspaces"), + fl!("top-panel", "applications"), + ]) + .view_fn(|app, section| { + let desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + toggler( + None, + desktop.show_workspaces_button, + Message::ShowWorkspacesButton, + ), + )) + .add(settings::item( + &descriptions[1], + toggler( + None, + desktop.show_applications_button, + Message::ShowApplicationsButton, + ), + )) + .apply(Element::from) + .map(crate::Message::Desktop) + }) +} + +pub fn window_controls() -> Section { + Section::new() + .title(fl!("window-controls")) + .descriptions(vec![ + fl!("window-controls", "minimize"), + fl!("window-controls", "maximize"), + ]) + .view_fn(|app, section| { + let desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + toggler( + None, + desktop.show_minimize_button, + Message::ShowMinimizeButton, + ), + )) + .add(settings::item( + &descriptions[1], + toggler( + None, + desktop.show_maximize_button, + Message::ShowMaximizeButton, + ), + )) + .apply(Element::from) + .map(crate::Message::Desktop) + }) +} diff --git a/src/page/desktop/wallpaper.rs b/src/page/desktop/wallpaper.rs new file mode 100644 index 0000000..17500b0 --- /dev/null +++ b/src/page/desktop/wallpaper.rs @@ -0,0 +1,98 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use super::Message; +use apply::Apply; +use cosmic::{ + iced::widget::{column, container, horizontal_space, image, row, svg, text}, + iced::Length, + theme, + widget::{list_column, settings, toggler}, + Element, +}; +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "wallpaper"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("wallpaper")) + .description(fl!("wallpaper", "desc")) + .icon_name("preferences-desktop-wallpaper-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(settings())]) + } +} + +pub fn settings() -> Section { + Section::new() + .descriptions(vec![ + fl!("wallpaper", "same"), + fl!("wallpaper", "fit"), + fl!("wallpaper", "slide"), + fl!("wallpaper", "change"), + ]) + .view_fn(|app, section| { + let descriptions = §ion.descriptions; + let desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + let image_paths: Vec = Vec::new(); + + let mut image_column = Vec::with_capacity(image_paths.len() / 4); + for chunk in image_paths.chunks(4) { + let mut image_row = Vec::with_capacity(chunk.len()); + for image_path in chunk.iter() { + image_row.push(if image_path.ends_with(".svg") { + svg(svg::Handle::from_path(image_path)) + .width(Length::Units(150)) + .into() + } else { + image(image_path).width(Length::Units(150)).into() + }); + } + image_column.push(row(image_row).spacing(16).into()); + } + + let children = vec![ + row!( + horizontal_space(Length::Fill), + container( + image("/usr/share/backgrounds/pop/kate-hazen-COSMIC-desktop-wallpaper.png") + .width(Length::Units(300)) + ) + .padding(4) + .style(theme::Container::Box), + horizontal_space(Length::Fill), + ) + .into(), + list_column() + .add(settings::item( + &descriptions[0], + toggler(None, desktop.same_background, Message::SameBackground), + )) + .add(settings::item(&descriptions[1], text("TODO"))) + .add(settings::item( + &descriptions[2], + toggler(None, desktop.slideshow, Message::Slideshow), + )) + .into(), + column(image_column).spacing(16).into(), + ]; + + settings::view_column(children) + .padding(0) + .apply(Element::from) + .map(crate::Message::Desktop) + }) +} diff --git a/src/page/desktop/workspaces.rs b/src/page/desktop/workspaces.rs new file mode 100644 index 0000000..96927fa --- /dev/null +++ b/src/page/desktop/workspaces.rs @@ -0,0 +1,84 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use cosmic::iced::{widget::horizontal_space, Length}; +use cosmic::widget::settings; +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "workspaces"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("workspaces")) + .description(fl!("workspaces", "desc")) + .icon_name("preferences-pop-desktop-workspaces-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![ + sections.insert(behavior()), + sections.insert(multi_behavior()), + ]) + } +} + +fn behavior() -> Section { + Section::new() + .title(fl!("workspaces-behavior")) + .descriptions(vec![ + fl!("workspaces-behavior", "dynamic"), + fl!("workspaces-behavior", "fixed"), + ]) + .view_fn(|app, section| { + let _desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + + let descriptions = §ion.descriptions; + + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + horizontal_space(Length::Fill), + )) + .add(settings::item( + &descriptions[1], + horizontal_space(Length::Fill), + )) + .into() + }) +} + +fn multi_behavior() -> Section { + Section::new() + .title(fl!("workspaces-multi-behavior")) + .descriptions(vec![ + fl!("workspaces-multi-behavior", "span"), + fl!("workspaces-multi-behavior", "separate"), + ]) + .view_fn(|app, section| { + let _desktop = app + .pages + .resource::() + .expect("desktop model is missing"); + let descriptions = §ion.descriptions; + settings::view_section(§ion.title) + .add(settings::item( + &descriptions[0], + horizontal_space(Length::Fill), + )) + .add(settings::item( + &descriptions[1], + horizontal_space(Length::Fill), + )) + .into() + }) +} diff --git a/src/page/mod.rs b/src/page/mod.rs new file mode 100644 index 0000000..da8d19d --- /dev/null +++ b/src/page/mod.rs @@ -0,0 +1,57 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +pub mod desktop; +pub mod networking; +pub mod section; +pub mod time; +pub use section::Section; +pub mod sound; +pub mod system; + +mod model; + +pub use model::{Insert, Model}; + +use derive_setters::Setters; +use slotmap::SlotMap; + +slotmap::new_key_type! { + /// ID of a page + pub struct Entity; +} + +pub trait Page { + type Model: Default + 'static; + + /// A unique identity that is the same between application runs. + const PERSISTENT_ID: &'static str; + + fn page() -> Meta; + + #[must_use] + fn content(_sections: &mut SlotMap) -> Option { + None + } + + /// Attaches sub-pages to the page. + #[allow(clippy::must_use_candidate)] + fn sub_pages(page: Insert) -> Insert { + page + } +} + +#[derive(Default, Setters)] +#[must_use] +pub struct Meta { + #[setters(into)] + pub title: String, + #[setters(into)] + pub icon_name: &'static str, + #[setters(into)] + pub description: String, + #[setters(strip_option)] + pub parent: Option, +} + +pub type Content = Vec; diff --git a/src/page/model.rs b/src/page/model.rs new file mode 100644 index 0000000..cab4834 --- /dev/null +++ b/src/page/model.rs @@ -0,0 +1,211 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use std::{ + any::{Any, TypeId}, + collections::HashMap, +}; + +use crate::page::{self, section, Content, Meta, Page, Section}; +use regex::Regex; +use slotmap::{SecondaryMap, SlotMap, SparseSecondaryMap}; + +pub struct Model { + pub pages: SlotMap, + pub resource: HashMap>, + pub storage: HashMap>>, + pub sub_pages: SparseSecondaryMap>, + pub sections: SlotMap, + pub content: SparseSecondaryMap, +} + +impl Default for Model { + fn default() -> Self { + Self { + content: SparseSecondaryMap::new(), + pages: SlotMap::with_key(), + resource: HashMap::new(), + sections: SlotMap::with_key(), + storage: HashMap::new(), + sub_pages: SparseSecondaryMap::new(), + } + } +} + +impl Model { + /// Check if a page exists in the model. + #[must_use] + pub fn contains_item(&self, id: page::Entity) -> bool { + self.pages.contains_key(id) + } + + /// Returns the content of a page, if it has any. + #[must_use] + pub fn content(&self, page: page::Entity) -> Option<&[section::Entity]> { + self.content.get(page).map(Vec::as_slice) + } + + /// Get an immutable reference to data associated with a page. + #[must_use] + pub fn data(&self, id: page::Entity) -> Option<&Data> { + self.storage + .get(&TypeId::of::()) + .and_then(|storage| storage.get(id)) + .and_then(|data| data.downcast_ref()) + } + + /// Get a mutable reference to data associated with a page. + pub fn data_mut(&mut self, id: page::Entity) -> Option<&mut Data> { + self.storage + .get_mut(&TypeId::of::()) + .and_then(|storage| storage.get_mut(id)) + .and_then(|data| data.downcast_mut()) + } + + /// Associates data with the item. + pub fn data_set(&mut self, id: page::Entity, data: Data) { + if self.contains_item(id) { + self.storage + .entry(TypeId::of::()) + .or_insert_with(SecondaryMap::new) + .insert(id, Box::new(data)); + } + } + + /// Removes a specific data type from the item. + pub fn data_remove(&mut self, id: page::Entity) { + self.storage + .get_mut(&TypeId::of::()) + .and_then(|storage| storage.remove(id)); + } + + // Registers a new page in the settings panel. + pub fn register(&mut self) -> Insert { + let id = self.pages.insert(P::page()); + + if let Some(content) = P::content(&mut self.sections) { + self.content.insert(id, content); + } + + self.resource_register::(); + + P::sub_pages(Insert { id, model: self }) + } + + #[must_use] + pub fn resource(&self) -> Option<&Resource> { + self.resource + .get(&TypeId::of::()) + .and_then(|resource| resource.downcast_ref()) + } + + #[must_use] + pub fn resource_mut(&mut self) -> Option<&mut Resource> { + self.resource + .get_mut(&TypeId::of::()) + .and_then(|resource| resource.downcast_mut()) + } + + #[allow(unused_must_use)] + pub fn resource_register(&mut self) { + self.resource + .entry(TypeId::of::()) + .or_insert_with(|| Box::new(Resource::default())); + } + + /// Finds content of panels that match the search. + pub fn search<'a>( + &'a self, + rule: &'a Regex, + ) -> impl Iterator + 'a { + SearchIter { + content: self.content.iter(), + model: self, + sections: None, + rule, + page: page::Entity::default(), + } + } + + /// Returns the sub-pages of a page, if it has any. + pub fn sub_pages(&self, page: page::Entity) -> Option<&[page::Entity]> { + self.sub_pages.get(page).map(AsRef::as_ref) + } +} + +pub struct Insert<'a> { + pub model: &'a mut Model, + pub id: page::Entity, +} + +impl<'a> Insert<'a> { + #[must_use] + pub fn id(self) -> page::Entity { + self.id + } + + #[must_use] + pub fn content(self, content: Content) -> Self { + self.model.content.insert(self.id, content); + self + } + + /// Adds a page and associates it with its parent page. + #[allow(clippy::return_self_not_must_use)] + #[allow(clippy::must_use_candidate)] + pub fn sub_page(self) -> Self { + let page = self.model.pages.insert(Meta { + parent: Some(self.id), + ..P::page() + }); + + if let Some(content) = P::content(&mut self.model.sections) { + self.model.content.insert(page, content); + } + + self.model.resource_register::(); + + self.model + .sub_pages + .entry(self.id) + .expect("parent page missing") + .and_modify(|v| v.push(page)) + .or_insert_with(|| vec![page]); + + self + } +} + +pub struct SearchIter<'a> { + model: &'a Model, + content: slotmap::sparse_secondary::Iter<'a, page::Entity, Content>, + sections: Option>, + page: page::Entity, + rule: &'a Regex, +} + +impl<'a> Iterator for SearchIter<'a> { + type Item = (page::Entity, section::Entity); + + fn next(&mut self) -> Option { + 'outer: loop { + if let Some(sections) = self.sections.as_mut() { + for id in sections { + if self.model.sections[*id].matches_search(self.rule) { + return Some((self.page, *id)); + } + } + + self.sections = None; + } + + if let Some((page, content)) = self.content.next() { + self.page = page; + self.sections = Some(content.iter()); + continue 'outer; + } + + return None; + } + } +} diff --git a/src/page/networking/accounts.rs b/src/page/networking/accounts.rs new file mode 100644 index 0000000..781a44b --- /dev/null +++ b/src/page/networking/accounts.rs @@ -0,0 +1,11 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page; + +pub fn page() -> page::Meta { + page::Meta::default() + .title(fl!("online-accounts")) + .description(fl!("online-accounts", "desc")) + .icon_name("goa-panel-symbolic") +} diff --git a/src/page/networking/mod.rs b/src/page/networking/mod.rs new file mode 100644 index 0000000..df4d10d --- /dev/null +++ b/src/page/networking/mod.rs @@ -0,0 +1,5 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +pub mod accounts; +pub mod wired; diff --git a/src/page/networking/wired.rs b/src/page/networking/wired.rs new file mode 100644 index 0000000..c1cc124 --- /dev/null +++ b/src/page/networking/wired.rs @@ -0,0 +1,11 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page; + +pub fn page() -> page::Meta { + page::Meta::default() + .title(fl!("wired")) + .description(fl!("wired", "desc")) + .icon_name("network-workgroup-symbolic") +} diff --git a/src/page/section.rs b/src/page/section.rs new file mode 100644 index 0000000..98a1ca3 --- /dev/null +++ b/src/page/section.rs @@ -0,0 +1,65 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use derive_setters::Setters; +use regex::Regex; + +use crate::SettingsApp; + +slotmap::new_key_type! { + /// ID of a page section + pub struct Entity; +} + +/// A searchable sub-component of a page. Searches can group multiple sections together. +#[derive(Setters)] +#[must_use] +pub struct Section { + #[setters(into)] + pub title: String, + pub descriptions: Vec, + pub view_fn: for<'a> fn(&'a SettingsApp, &'a Section) -> cosmic::Element<'a, crate::Message>, + #[setters(bool)] + pub search_ignore: bool, +} + +impl Section { + pub const fn new() -> Self { + Self { + title: String::new(), + descriptions: Vec::new(), + view_fn: Self::unimplemented, + search_ignore: false, + } + } + + #[must_use] + pub fn matches_search(&self, rule: &Regex) -> bool { + if self.search_ignore { + return false; + } + + if rule.is_match(self.title.as_str()) { + return true; + } + + for description in &self.descriptions { + if rule.is_match(description.as_str()) { + return true; + } + } + + false + } + + #[must_use] + pub fn unimplemented<'a>( + _app: &'a SettingsApp, + _section: &'a Section, + ) -> cosmic::Element<'a, crate::Message> { + cosmic::widget::settings::view_column(vec![cosmic::widget::settings::view_section("") + .add(crate::widget::unimplemented_page()) + .into()]) + .into() + } +} diff --git a/src/page/sound.rs b/src/page/sound.rs new file mode 100644 index 0000000..95ba0d4 --- /dev/null +++ b/src/page/sound.rs @@ -0,0 +1,148 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page::{self, Content, Section}; +use cosmic::{iced, widget::settings}; +use slotmap::SlotMap; + +use super::section; + +#[derive(Default)] +pub struct Sound {} + +pub struct Page; + +impl page::Page for Page { + type Model = Sound; + + const PERSISTENT_ID: &'static str = "sound"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("sound")) + .description(fl!("sound", "desc")) + .icon_name("multimedia-volume-control-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![ + sections.insert(output()), + sections.insert(input()), + sections.insert(alerts()), + sections.insert(applications()), + ]) + } +} + +fn alerts() -> Section { + Section::new() + .title(fl!("sound-alerts")) + .descriptions(vec![ + fl!("sound-alerts", "volume"), + fl!("sound-alerts", "sound"), + ]) + .view_fn(|app, section| { + let _sound = app + .pages + .resource::() + .expect("sound model is missing"); + + settings::view_section(§ion.title) + .add(settings::item( + §ion.descriptions[0], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[1], + iced::widget::text("TODO"), + )) + .into() + }) +} + +fn applications() -> Section { + Section::new() + .title(fl!("sound-applications")) + .descriptions(vec![fl!("sound-applications", "desc")]) + .view_fn(|app, section| { + let _sound = app + .pages + .resource::() + .expect("sound model is missing"); + + settings::view_section(§ion.title) + .add(settings::item( + §ion.descriptions[0], + iced::widget::text("TODO"), + )) + .into() + }) +} + +fn input() -> Section { + Section::new() + .title(fl!("sound-input")) + .descriptions(vec![ + fl!("sound-input", "volume"), + fl!("sound-input", "device"), + fl!("sound-input", "level"), + ]) + .view_fn(|app, section| { + let _sound = app + .pages + .resource::() + .expect("sound model is missing"); + + settings::view_section(§ion.title) + .add(settings::item( + §ion.descriptions[0], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[1], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[2], + iced::widget::text("TODO"), + )) + .into() + }) +} + +fn output() -> Section { + Section::new() + .title(fl!("sound-output")) + .descriptions(vec![ + fl!("sound-output", "volume"), + fl!("sound-output", "device"), + fl!("sound-output", "level"), + fl!("sound-output", "config"), + fl!("sound-output", "balance"), + ]) + .view_fn(|app, section| { + let _sound = app + .pages + .resource::() + .expect("sound model is missing"); + + settings::view_section(§ion.title) + .add(settings::item( + §ion.descriptions[0], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[1], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[2], + iced::widget::text("TODO"), + )) + .add(settings::item( + §ion.descriptions[3], + iced::widget::text("TODO"), + )) + .into() + }) +} diff --git a/src/page/system/about.rs b/src/page/system/about.rs new file mode 100644 index 0000000..0a1598a --- /dev/null +++ b/src/page/system/about.rs @@ -0,0 +1,111 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page::{self, Content, Section}; +use cosmic::{ + iced::{ + widget::{horizontal_space, row}, + Length, + }, + widget::{icon, list_column, settings, text}, +}; +use slotmap::SlotMap; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "about"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("about")) + .description(fl!("about", "desc")) + .icon_name("help-about-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![ + sections.insert(distributor_logo()), + sections.insert(device()), + sections.insert(hardware()), + sections.insert(os()), + sections.insert(related()), + ]) + } +} + +fn device() -> Section { + Section::new() + .descriptions(vec![fl!("about-device")]) + .view_fn(|_app, section| { + list_column() + .add(settings::item(§ion.descriptions[0], text("TODO"))) + .into() + }) +} + +fn distributor_logo() -> Section { + Section::new().search_ignore().view_fn(|_app, _section| { + row!( + horizontal_space(Length::Fill), + icon("distributor-logo", 78), + horizontal_space(Length::Fill), + ) + .into() + }) +} + +fn hardware() -> Section { + Section::new() + .title(fl!("about-hardware")) + .descriptions(vec![ + fl!("about-hardware", "model"), + fl!("about-hardware", "memory"), + fl!("about-hardware", "processor"), + fl!("about-hardware", "graphics"), + fl!("about-hardware", "disk-capacity"), + ]) + .view_fn(|_app, section| { + let desc = §ion.descriptions; + settings::view_section(§ion.title) + .add(settings::item(&desc[0], text("TODO"))) + .add(settings::item(&desc[1], text("TODO"))) + .add(settings::item(&desc[2], text("TODO"))) + .add(settings::item(&desc[3], text("TODO"))) + .add(settings::item(&desc[4], text("TODO"))) + .into() + }) +} + +fn os() -> Section { + Section::new() + .title(fl!("about-os")) + .descriptions(vec![ + fl!("about-os", "os"), + fl!("about-os", "os-architecture"), + fl!("about-os", "desktop-environment"), + fl!("about-os", "windowing-system"), + ]) + .view_fn(|_app, section| { + let desc = §ion.descriptions; + settings::view_section(§ion.title) + .add(settings::item(&desc[0], text("TODO"))) + .add(settings::item(&desc[1], text("TODO"))) + .add(settings::item(&desc[2], text("TODO"))) + .add(settings::item(&desc[3], text("TODO"))) + .into() + }) +} + +fn related() -> Section { + Section::new() + .title(fl!("about-related")) + .descriptions(vec![fl!("about-related", "support")]) + .view_fn(|_app, section| { + settings::view_section(§ion.title) + .add(settings::item(§ion.descriptions[0], text("TODO"))) + .into() + }) +} diff --git a/src/page/system/firmware.rs b/src/page/system/firmware.rs new file mode 100644 index 0000000..af6afb6 --- /dev/null +++ b/src/page/system/firmware.rs @@ -0,0 +1,25 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "firmware"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("firmware")) + .description(fl!("firmware", "desc")) + .icon_name("firmware-manager-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/page/system/mod.rs b/src/page/system/mod.rs new file mode 100644 index 0000000..3ffa4d8 --- /dev/null +++ b/src/page/system/mod.rs @@ -0,0 +1,31 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +pub mod about; +pub mod firmware; +pub mod users; + +use crate::page; + +pub struct Page; + +impl page::Page for Page { + type Model = Model; + + const PERSISTENT_ID: &'static str = "system"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("system")) + .icon_name("system-users-symbolic") + } + + fn sub_pages(page: page::Insert) -> page::Insert { + page.sub_page::() + .sub_page::() + .sub_page::() + } +} + +#[derive(Default)] +pub struct Model {} diff --git a/src/page/system/users.rs b/src/page/system/users.rs new file mode 100644 index 0000000..f3d77e3 --- /dev/null +++ b/src/page/system/users.rs @@ -0,0 +1,25 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use slotmap::SlotMap; + +use crate::page::{self, section, Content, Section}; + +pub struct Page; + +impl page::Page for Page { + type Model = super::Model; + + const PERSISTENT_ID: &'static str = "users"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("users")) + .description(fl!("users", "desc")) + .icon_name("system-users-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/page/time/date.rs b/src/page/time/date.rs new file mode 100644 index 0000000..ea13185 --- /dev/null +++ b/src/page/time/date.rs @@ -0,0 +1,141 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page::{self, section, Content, Section}; +use apply::Apply; +use cosmic::{ + iced::{widget::horizontal_space, Length}, + widget::settings, +}; +use slotmap::SlotMap; + +#[derive(Default)] +pub struct Model { + auto: bool, + auto_timezone: bool, + military_time: bool, +} + +impl Model { + pub fn update(&mut self, message: Message) { + match message { + Message::Automatic(enable) => self.auto = enable, + Message::AutomaticTimezone(enable) => self.auto_timezone = enable, + Message::MilitaryTime(enable) => self.military_time = enable, + } + } +} + +#[derive(Clone, Copy, Debug)] +pub enum Message { + Automatic(bool), + AutomaticTimezone(bool), + MilitaryTime(bool), +} + +pub struct Page; + +impl page::Page for Page { + type Model = Model; + + const PERSISTENT_ID: &'static str = "time-date"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("time-date")) + .description(fl!("time-date", "desc")) + .icon_name("preferences-system-time-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![ + sections.insert(date()), + sections.insert(timezone()), + sections.insert(format()), + ]) + } +} + +fn date() -> Section { + Section::new() + .title(fl!("time-date")) + .descriptions(vec![fl!("time-date", "auto"), fl!("time-date")]) + .view_fn(|app, section| { + let model = app + .pages + .resource::() + .expect("time & date model not found"); + + settings::view_section(§ion.title) + .add( + settings::item::builder(§ion.descriptions[0]) + .toggler(model.auto, Message::Automatic), + ) + .add(settings::item( + §ion.descriptions[1], + horizontal_space(Length::Fill), + )) + .apply(cosmic::Element::from) + .map(crate::Message::DateAndTime) + }) +} + +fn format() -> Section { + Section::new() + .title(fl!("time-format")) + .descriptions(vec![ + fl!("time-format", "twenty-four"), + fl!("time-format", "first"), + ]) + .view_fn(|app, section| { + let model = app + .pages + .resource::() + .expect("time & date model not found"); + + settings::view_section(§ion.title) + // 24-hour toggle + .add( + settings::item::builder(§ion.descriptions[0]) + .toggler(model.military_time, Message::MilitaryTime), + ) + // First day of week + .add(settings::item( + §ion.descriptions[1], + horizontal_space(Length::Fill), + )) + .apply(cosmic::Element::from) + .map(crate::Message::DateAndTime) + }) +} + +fn timezone() -> Section { + Section::new() + .title(fl!("time-zone")) + .descriptions(vec![ + fl!("time-zone", "auto"), + fl!("time-zone", "auto-info"), + fl!("time-zone"), + ]) + .view_fn(|app, section| { + let model = app + .pages + .resource::() + .expect("time & date model not found"); + + settings::view_section(§ion.title) + // Automatic timezone toggle + .add( + settings::item::builder(§ion.descriptions[0]) + .description(§ion.descriptions[1]) + .toggler(model.auto_timezone, Message::AutomaticTimezone), + ) + // Time zone select + .add( + settings::item::builder(§ion.descriptions[2]) + .control(horizontal_space(Length::Fill)), + ) + .apply(cosmic::Element::from) + .map(crate::Message::DateAndTime) + }) +} diff --git a/src/page/time/mod.rs b/src/page/time/mod.rs new file mode 100644 index 0000000..1bd6546 --- /dev/null +++ b/src/page/time/mod.rs @@ -0,0 +1,26 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page; + +pub mod date; +pub mod region; + +pub struct Page; + +impl page::Page for Page { + type Model = (); + + const PERSISTENT_ID: &'static str = "time"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("time")) + .description(fl!("time", "desc")) + .icon_name("preferences-system-time-symbolic") + } + + fn sub_pages(page: page::Insert) -> page::Insert { + page.sub_page::().sub_page::() + } +} diff --git a/src/page/time/region.rs b/src/page/time/region.rs new file mode 100644 index 0000000..ac384f0 --- /dev/null +++ b/src/page/time/region.rs @@ -0,0 +1,24 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use crate::page::{self, section, Content, Section}; +use slotmap::SlotMap; + +pub struct Page; + +impl page::Page for Page { + type Model = (); + + const PERSISTENT_ID: &'static str = "time-region"; + + fn page() -> page::Meta { + page::Meta::default() + .title(fl!("time-region")) + .description(fl!("time-region", "desc")) + .icon_name("preferences-desktop-locale-symbolic") + } + + fn content(sections: &mut SlotMap) -> Option { + Some(vec![sections.insert(Section::new())]) + } +} diff --git a/src/widget/mod.rs b/src/widget/mod.rs new file mode 100644 index 0000000..be68a50 --- /dev/null +++ b/src/widget/mod.rs @@ -0,0 +1,111 @@ +// Copyright 2023 System76 +// SPDX-License-Identifier: GPL-3.0-only + +use apply::Apply; +use cosmic::iced::{ + self, + widget::{button, column, container, horizontal_space, row, vertical_space, Button}, + Length, +}; +use cosmic::widget::{divider, icon, list, settings, text}; +use cosmic::{theme, Element}; + +use crate::page::{self, Meta}; + +#[must_use] +pub fn search_header(pages: &page::Model, page: page::Entity) -> cosmic::Element { + let page_meta = &pages.pages[page]; + + let mut column_children = Vec::with_capacity(4); + + if let Some(parent) = page_meta.parent { + let parent_meta = &pages.pages[parent]; + + column_children.push( + text(parent_meta.title.as_str()) + .size(14) + .apply(container) + .padding([0, 0, 0, 6]) + .into(), + ); + } + + column_children.push( + crate::widget::search_page_link(&page_meta.title) + .on_press(crate::Message::Page(page)) + .into(), + ); + + column_children.push(vertical_space(Length::Units(8)).into()); + column_children.push(divider::horizontal::heavy().into()); + + column(column_children).into() +} + +#[must_use] +pub fn search_page_link(title: &str) -> Button { + text(title) + .size(30) + .horizontal_alignment(iced::alignment::Horizontal::Left) + .apply(button) + .style(cosmic::theme::Button::Link) +} + +#[must_use] +pub fn page_title(page: &Meta) -> Element { + row!( + text(page.title.as_str()).size(30), + horizontal_space(Length::Fill) + ) + .into() +} + +#[must_use] +pub fn parent_page_button<'a, Message: Clone + 'static>( + parent: &'a Meta, + sub_page: &'a Meta, + on_press: Message, +) -> Element<'a, Message> { + column!( + button(row!( + icon("go-previous-symbolic", 16).style(theme::Svg::SymbolicLink), + text(parent.title.as_str()).size(16), + )) + .padding(0) + .style(theme::Button::Link) + .on_press(on_press), + row!( + text(sub_page.title.as_str()).size(30), + horizontal_space(Length::Fill), + ), + ) + .spacing(10) + .into() +} + +#[must_use] +pub fn sub_page_button(entity: page::Entity, page: &Meta) -> Element { + settings::item::builder(page.title.as_str()) + .description(page.description.as_str()) + .icon(icon(page.icon_name, 20).style(theme::Svg::Symbolic)) + .control(row!( + horizontal_space(Length::Fill), + icon("go-next-symbolic", 20).style(theme::Svg::Symbolic) + )) + .spacing(16) + .apply(container) + .padding([20, 24]) + .style(theme::Container::Custom(list::column::style)) + .apply(button) + .padding(0) + .style(theme::Button::Transparent) + .on_press(entity) + .into() +} + +#[must_use] +pub fn unimplemented_page() -> Element<'static, Message> { + settings::view_section("") + .add(text("We haven't created that panel yet, and/or it is using a similar idea as current Pop! designs.")) + .into() +}