diff --git a/Cargo.lock b/Cargo.lock index 2936ed4..ae1b905 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ "accesskit_consumer", "atspi-common", "serde", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -72,7 +72,7 @@ dependencies = [ "serde", "tokio", "tokio-stream", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] @@ -172,9 +172,9 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.4" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] @@ -198,7 +198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" dependencies = [ "android-properties", - "bitflags 2.13.0", + "bitflags 2.11.1", "cc", "jni", "libc", @@ -277,9 +277,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "apply" @@ -304,9 +304,9 @@ checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" [[package]] name = "arc-swap" -version = "1.9.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" dependencies = [ "rustversion", ] @@ -330,9 +330,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.7" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-slice" @@ -367,7 +367,7 @@ dependencies = [ "serde_repr", "tokio", "url", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] @@ -387,7 +387,7 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] @@ -573,11 +573,11 @@ dependencies = [ "enumflags2", "serde", "static_assertions", - "zbus 5.16.0", + "zbus 5.15.0", "zbus-lockstep", "zbus-lockstep-macros", "zbus_names 4.3.2", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -588,14 +588,14 @@ checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" dependencies = [ "atspi-common", "serde", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] name = "auto_enums" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4487600931c9a89f8db7ffbdf3fbdd45bb7bd85e26861f659a463cd0dff966" +checksum = "65398a2893f41bce5c9259f6e1a4f03fbae40637c1bdc755b4f387f48c613b03" dependencies = [ "derive_utils", "proc-macro2", @@ -696,9 +696,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.13.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" dependencies = [ "serde_core", ] @@ -729,9 +729,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.12.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" dependencies = [ "hybrid-array", "zeroize", @@ -770,9 +770,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3f6da4992df95bbcd9af42a6c7dcb994498fc9048230405f3b36ff7cd3f145" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" dependencies = [ "bytes", "cfg_aliases", @@ -780,9 +780,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "5.0.3" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -799,13 +799,13 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.3" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cee35f73844aa3014bb606320a6c1f010249dbdf43342fe54b5a4f6a8ed4b79" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", - "serde_core", + "serde", ] [[package]] @@ -869,9 +869,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.12.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "bzip2" @@ -898,7 +898,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "polling", "rustix 1.1.4", "slab", @@ -919,14 +919,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.65" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex 2.0.1", + "shlex", ] [[package]] @@ -942,9 +942,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.20.8" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb693542bcafa528e198be0ebd9d3632ca5b7c93dbe7237460e199910835997c" +checksum = "3c6b04e07d8080154ed4ac03546d9a2b303cc2fe1901ba0b35b301516e289368" dependencies = [ "smallvec", "target-lexicon", @@ -964,9 +964,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.45" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" dependencies = [ "iana-time-zone", "js-sys", @@ -1099,9 +1099,9 @@ dependencies = [ [[package]] name = "compio-buf" -version = "0.8.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51a2c35873865376ed4cdb6cfeb602b6cf569815f017ddd7bd8f86ad49b34c7" +checksum = "a00d719dbd8c602ab0d25d219cbc6b517008858de7a8d6c51b4dc95aefff4dce" dependencies = [ "arrayvec", "bytes", @@ -1221,9 +1221,9 @@ dependencies = [ [[package]] name = "configparser" -version = "3.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46dec724fd22199ebde05033a0cbae453bc3b1ecff11eb6a6bb3eec4b90c6a4" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" [[package]] name = "const-oid" @@ -1293,7 +1293,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "core-foundation 0.10.1", "libc", ] @@ -1322,21 +1322,8 @@ dependencies = [ name = "cosmic-client-toolkit" version = "0.2.0" dependencies = [ - "bitflags 2.13.0", - "cosmic-protocols 0.2.0", - "libc", - "smithay-client-toolkit", - "wayland-client", - "wayland-protocols", -] - -[[package]] -name = "cosmic-client-toolkit" -version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2" -dependencies = [ - "bitflags 2.13.0", - "cosmic-protocols 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)", + "bitflags 2.11.1", + "cosmic-protocols", "libc", "smithay-client-toolkit", "wayland-client", @@ -1355,12 +1342,12 @@ dependencies = [ "iced_futures", "known-folders", "notify", - "ron 0.12.2", + "ron 0.12.1", "serde", "tokio", "tracing", "xdg", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] @@ -1373,14 +1360,14 @@ dependencies = [ [[package]] name = "cosmic-files" -version = "1.2.0" +version = "1.0.14" dependencies = [ "anyhow", "atomic_float", "bstr", "bzip2", "compio", - "cosmic-client-toolkit 0.2.0 (git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1)", + "cosmic-client-toolkit", "cosmic-mime-apps", "dirs 6.0.0", "fastrand", @@ -1418,8 +1405,7 @@ dependencies = [ "rust-embed", "rustc-hash 2.1.2", "serde", - "sha2 0.10.9", - "shlex 1.3.0", + "shlex", "slotmap", "tar", "tempfile", @@ -1442,7 +1428,7 @@ dependencies = [ [[package]] name = "cosmic-files-applet" -version = "1.2.0" +version = "1.0.14" dependencies = [ "cosmic-files", "log", @@ -1456,7 +1442,7 @@ dependencies = [ "bstr", "btoi", "memchr", - "memmap2 0.9.11", + "memmap2 0.9.10", "thiserror 2.0.18", "tracing", "xdg", @@ -1465,7 +1451,7 @@ dependencies = [ [[package]] name = "cosmic-mime-apps" version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-mime-apps.git#8fc81e8857e46c018ea21ab985aaf30ac853c007" +source = "git+https://github.com/pop-os/cosmic-mime-apps.git#a95c8043a7b41ca3c143a1fad5b3b8a5a3411008" dependencies = [ "freedesktop-desktop-entry", "mime 0.3.17", @@ -1477,21 +1463,7 @@ dependencies = [ name = "cosmic-protocols" version = "0.2.0" dependencies = [ - "bitflags 2.13.0", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "wayland-server", -] - -[[package]] -name = "cosmic-protocols" -version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=c253ec1#c253ec1d6804afbcdf250f5cc37ae1194bba7bd2" -dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1516,14 +1488,14 @@ dependencies = [ name = "cosmic-settings-daemon" version = "0.1.1-yoda.1" dependencies = [ - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] name = "cosmic-text" version = "0.19.0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "fontdb", "harfrust", "linebender_resource_handle", @@ -1531,7 +1503,7 @@ dependencies = [ "rangemap", "rustc-hash 2.1.2", "self_cell", - "skrifa 0.40.0", + "skrifa", "smol_str", "swash", "sys-locale", @@ -1553,7 +1525,7 @@ dependencies = [ "dirs 6.0.0", "hex_color", "palette", - "ron 0.12.2", + "ron 0.12.1", "serde", "serde_json", "thiserror 2.0.18", @@ -1776,44 +1748,13 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" -[[package]] -name = "defmt" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e524506490a1953d237cb87b1cfc1e46f88c18f10a22dfe0f507dc6bfc7f7f" -dependencies = [ - "bitflags 1.3.2", - "defmt-macros", -] - -[[package]] -name = "defmt-macros" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a27770e9c8f719a79d8b638281f4d828f77d8fd61e0bd94451b9b85e576a0b" -dependencies = [ - "defmt-parser", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "defmt-parser" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" -dependencies = [ - "thiserror 2.0.18", -] - [[package]] name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ + "powerfmt", "serde_core", ] @@ -1856,7 +1797,7 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ - "block-buffer 0.12.1", + "block-buffer 0.12.0", "const-oid", "crypto-common 0.2.2", "ctutils", @@ -1932,7 +1873,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "libc", "objc2 0.6.4", @@ -1962,7 +1903,7 @@ dependencies = [ name = "dnd" version = "0.1.0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "mime 0.1.0", "raw-window-handle", "smithay-client-toolkit", @@ -2029,19 +1970,18 @@ dependencies = [ [[package]] name = "env_filter" -version = "2.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217" +checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" dependencies = [ "log", - "regex", ] [[package]] name = "env_logger" -version = "0.11.11" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ "anstream", "anstyle", @@ -2348,7 +2288,7 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "slotmap", "tinyvec", "ttf-parser", @@ -2536,9 +2476,9 @@ dependencies = [ [[package]] name = "generator" -version = "0.8.9" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b854b0e584ead1a33f18b2fcad7cf7be18b3875c78816b753639aa501513ae" +checksum = "52f04ae4152da20c76fe800fa48659201d5cf627c5149ca0b707b69d7eef6cf9" dependencies = [ "cc", "cfg-if", @@ -2584,14 +2524,16 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi 6.0.0", + "wasip2", + "wasip3", "wasm-bindgen", ] @@ -2688,7 +2630,7 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16de123c2e6c90ce3b573b7330de19be649080ec612033d397d72da265f1bd8b" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "futures-channel", "futures-core", "futures-executor", @@ -2788,7 +2730,7 @@ dependencies = [ "log", "presser", "thiserror 2.0.18", - "windows 0.62.2", + "windows 0.61.3", ] [[package]] @@ -2797,7 +2739,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2808,7 +2750,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", ] [[package]] @@ -2845,10 +2787,10 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "core_maths", - "read-fonts 0.37.0", + "read-fonts", "smallvec", ] @@ -2936,9 +2878,9 @@ dependencies = [ [[package]] name = "hybrid-array" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" dependencies = [ "typenum", ] @@ -3066,9 +3008,9 @@ dependencies = [ name = "iced_core" version = "0.14.0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytes", - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "dnd", "glam", "lilt", @@ -3112,7 +3054,7 @@ dependencies = [ name = "iced_graphics" version = "0.14.0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "cosmic-text", "half", @@ -3152,7 +3094,7 @@ name = "iced_runtime" version = "0.14.0" dependencies = [ "bytes", - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "dnd", "iced_core", "iced_futures", @@ -3181,9 +3123,9 @@ dependencies = [ name = "iced_wgpu" version = "0.14.0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "cryoglyph", "futures", "glam", @@ -3208,7 +3150,7 @@ dependencies = [ name = "iced_widget" version = "0.14.2" dependencies = [ - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "dnd", "iced_renderer", "iced_runtime", @@ -3225,7 +3167,7 @@ dependencies = [ name = "iced_winit" version = "0.14.0" dependencies = [ - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "cursor-icon", "dnd", "iced_debug", @@ -3324,9 +3266,9 @@ checksum = "846b0857ca091204be3c874bc93daaf89d4777e8d2d20b0d3ffe8f671d98014b" [[package]] name = "icu_collator" -version = "2.2.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bbdf98e5e0aa827770acee171ebb568aaab975a36b56afdb5fd0e2f525750bb" +checksum = "b521b92a2666061ddda902769d8a4cf730b5c9529a845cc1b69770b12a6c9a71" dependencies = [ "icu_collator_data", "icu_collections", @@ -3651,6 +3593,12 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f2f8aeca682d874a5247084aa4fb7d1cef9ba45d889c21209a8818dcaaa0ec9" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -3680,9 +3628,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.26" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b915661dd01db3f05050265b2477bcc6527b3792388e2749b41623cc592be67d" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -3745,9 +3693,9 @@ checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "imgref" -version = "1.12.2" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89194689a993ab15268672e99e7b0e19da2da3268ac682e8f02d29d4d1434cd7" +checksum = "40fac9d56ed6437b198fddba683305e8e2d651aa42647f00f5ae542e7f5c94a2" [[package]] name = "indexmap" @@ -3783,11 +3731,11 @@ dependencies = [ [[package]] name = "inotify" -version = "0.11.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533e68a5842e734946fe159fb03fc9bbbb254f590dd0d8ad321ae5ff7beca2c1" +checksum = "bd5b3eaf1a28b758ac0faa5a4254e8ab2705605496f1b1f3fbbc3988ad73d199" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "inotify-sys", "libc", ] @@ -3842,11 +3790,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.13" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9080b15e63775b9a2ac7dca720f7050a8b955e092ea0f6020a4a80f69998cdc0" +checksum = "4d09b98f7eace8982db770e4408e7470b028ce513ac28fecdc6bf4c30fe92b62" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cfg-if", "libc", ] @@ -3910,18 +3858,17 @@ checksum = "2ceaf4c6c48465bead8cb6a0b7c4ee0c86ecbb31239032b9c66ab9a08d2f3ee1" [[package]] name = "jiff" -version = "0.2.31" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccfe6121cbe750cf81efa362d85c0bde7ea298ec43092d3a193baca59cdbd634" +checksum = "6835eea34fb6321b9b3aa7b685c2b433948c09447e389dc017fdf687d5d11e65" dependencies = [ - "defmt", "jiff-static", "jiff-tzdb-platform", "log", "portable-atomic", "portable-atomic-util", "serde_core", - "windows-link 0.2.1", + "windows-sys 0.61.2", ] [[package]] @@ -3937,9 +3884,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.31" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e165e897f662d428f3cd3828a919dbe067c2d42bb1031eede74ef9d27ecdedd2" +checksum = "3c22e04db9c58f5136eb1757f3d5c49a7b187f49e52185228cbd2f5acdfcc08c" dependencies = [ "proc-macro2", "quote", @@ -4031,12 +3978,13 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.103" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" dependencies = [ "cfg-if", "futures-util", + "once_cell", "wasm-bindgen", ] @@ -4093,9 +4041,9 @@ dependencies = [ [[package]] name = "jxl-grid" -version = "0.6.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01671307879a033bfa52e6e8784b941aca770b3f3a7d33830b455b6844f793fb" +checksum = "a0e0ef92d5d60e76bf41098e57e985f523185e08fad54268da448637feca6989" dependencies = [ "tracing", ] @@ -4132,9 +4080,9 @@ dependencies = [ [[package]] name = "jxl-modular" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2f045b24c738dd91d482be385512b512721ae08a671bd4b27bf1c47f215235" +checksum = "da758b2f989aafd9eeb39489fe43d7be5a3a0d2ad61cf1bad705eb6990a6053c" dependencies = [ "jxl-bitstream", "jxl-coding", @@ -4146,9 +4094,9 @@ dependencies = [ [[package]] name = "jxl-oxide" -version = "0.12.6" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36c662923f47586880211f3bc7c0d83fb3a9b410d278c7bde93450748abeef3" +checksum = "ee8ecd2678ed70c1eda42b811ccb2e25ab836edeb18e7f1178c1f917ed36b772" dependencies = [ "brotli-decompressor", "bytemuck", @@ -4176,9 +4124,9 @@ dependencies = [ [[package]] name = "jxl-render" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34386bfdb6a19b5a30cc9beb4d475d537422c31ae8c39bb69640fcce3fcaf19" +checksum = "aa0c3100918bd3c41bb0f8ce1f4f1664e48f3032ff8eeab0d6a2cfc3276f462d" dependencies = [ "bytemuck", "jxl-bitstream", @@ -4235,7 +4183,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "serde", ] @@ -4267,9 +4215,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "273c0752728918e0ac4976f2b275b6fefb9ecd400585dec929419f3844cd87b5" +checksum = "eac30106d7dce88daf4a3fcb4879ea939476d5074a9b7ddd0fb97fa4bed5596a" dependencies = [ "kqueue-sys", "libc", @@ -4281,7 +4229,7 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "libc", ] @@ -4312,6 +4260,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "lebe" version = "0.5.3" @@ -4337,7 +4291,7 @@ dependencies = [ "apply", "ashpd 0.12.3", "auto_enums", - "cosmic-client-toolkit 0.2.0", + "cosmic-client-toolkit", "cosmic-config", "cosmic-freedesktop-icons", "cosmic-settings-config", @@ -4372,7 +4326,7 @@ dependencies = [ "rust-embed", "rustix 1.1.4", "serde", - "shlex 1.3.0", + "shlex", "slotmap", "taffy", "thiserror 2.0.18", @@ -4380,14 +4334,14 @@ dependencies = [ "tracing", "unicode-segmentation", "url", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] name = "libfuzzer-sys" -version = "0.4.13" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" dependencies = [ "arbitrary", "cc", @@ -4415,10 +4369,10 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "libc", "plain", - "redox_syscall 0.8.1", + "redox_syscall 0.8.0", ] [[package]] @@ -4484,9 +4438,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.33" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "loom" @@ -4571,25 +4525,23 @@ dependencies = [ [[package]] name = "lzma-rust2" -version = "0.16.4" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce716bf1a316f47a280fc76295f6495b5bea4752bca01c3b3885e101b1c23c02" +checksum = "5e9ceaec84b54518262de7cf06b8b43e83c808349960f1610b21b0bfc9640f20" dependencies = [ "sha2 0.11.0", ] [[package]] name = "mac-notification-sys" -version = "0.6.15" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd604973958ddcc11b561193c0fb96ba146506ef2f231ef2e7c35fd2cbc9beca" +checksum = "29a16783dd1a47849b8c8133c9cd3eb2112cfbc6901670af3dba47c8bbfb07d3" dependencies = [ "cc", - "log", "objc2 0.6.4", "objc2-foundation 0.3.2", "time", - "uuid", ] [[package]] @@ -4632,9 +4584,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "memmap2" @@ -4647,9 +4599,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.11" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -4669,7 +4621,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block", "core-graphics-types 0.2.0", "foreign-types", @@ -4753,7 +4705,7 @@ checksum = "618f667225063219ddfc61251087db8a9aec3c3f0950c916b614e403486f1135" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.13.0", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "codespan-reporting", @@ -4777,7 +4729,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "jni-sys 0.3.1", "log", "ndk-sys", @@ -4813,7 +4765,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "libc", @@ -4860,7 +4812,7 @@ version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "fsevent-sys", "inotify", "kqueue", @@ -4887,16 +4839,16 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.18.0" +version = "4.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b4c1b4f2aa9f25f63a7a49d3dd0ed567b3670da15330a66b29434be899b891" +checksum = "50ff2e74231b72c832d82982193b417f230945be6bdb5575b251d941d31adb00" dependencies = [ "futures-lite", "log", "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus 5.16.0", + "zbus 5.15.0", ] [[package]] @@ -4905,7 +4857,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", ] [[package]] @@ -5057,7 +5009,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -5073,7 +5025,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", @@ -5086,7 +5038,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5098,7 +5050,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "objc2 0.6.4", @@ -5110,7 +5062,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "libc", "objc2-core-foundation", ] @@ -5133,7 +5085,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "objc2-core-foundation", "objc2-core-graphics", ] @@ -5150,7 +5102,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -5162,7 +5114,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "libc", "objc2 0.6.4", @@ -5175,7 +5127,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5187,7 +5139,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -5200,7 +5152,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -5229,12 +5181,13 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "open" -version = "5.3.6" +version = "5.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d3b65c44123a56e0133d2cd06ce4361bd3ca99d41198b2f25e3c3db9b8b4a" +checksum = "2fbaa89d2ddc8473c78a3adf69eea8cffa28c483b8e02a971ef31527cd0fc92c" dependencies = [ "is-wsl", "libc", + "pathdiff", ] [[package]] @@ -5392,6 +5345,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + [[package]] name = "pbkdf2" version = "0.13.0" @@ -5575,7 +5534,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "crc32fast", "fdeflate", "flate2", @@ -5655,6 +5614,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -5714,7 +5683,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "chrono", "flate2", "procfs-core", @@ -5727,7 +5696,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "chrono", "hex", ] @@ -5812,9 +5781,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -5989,16 +5958,6 @@ dependencies = [ "font-types", ] -[[package]] -name = "read-fonts" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" -dependencies = [ - "bytemuck", - "font-types", -] - [[package]] name = "recently-used-xbel" version = "1.2.0" @@ -6021,7 +5980,7 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c07d0d6d291e3a951bd847b1cd4af32fc6243d64116cf7702838c02797688b7" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "libredox", ] @@ -6031,16 +5990,16 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", ] [[package]] name = "redox_syscall" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b44b894f2a6e36457d665d1e08c3866add6ed5e70050c1b4ba8a8ddedb02ce7" +checksum = "7c7591fa2c6b601dfcfe5f043f65a1c39fcdf50efefcd7f1572e538c1f4b398d" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", ] [[package]] @@ -6087,9 +6046,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.4" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -6110,9 +6069,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "renderdoc-sys" @@ -6177,7 +6136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468" dependencies = [ "base64", - "bitflags 2.13.0", + "bitflags 2.11.1", "serde", "serde_derive", "unicode-ident", @@ -6185,11 +6144,11 @@ dependencies = [ [[package]] name = "ron" -version = "0.12.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3" +checksum = "4147b952f3f819eca0e99527022f7d6a8d05f111aeb0a62960c74eb283bec8fc" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "once_cell", "serde", "serde_derive", @@ -6264,7 +6223,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -6277,7 +6236,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.12.1", @@ -6296,7 +6255,7 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd3c7c96f8a08ee34eff8857b11b49b07d71d1c3f4e88f8a88d4c9e9f90b1702" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "core_maths", "log", @@ -6361,7 +6320,7 @@ checksum = "1dd3accc0f3f4bbaf2c9e1957a030dc582028130c67660d44c0a0345a22ca69b" dependencies = [ "ab_glyph", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "smithay-client-toolkit", "tiny-skia", ] @@ -6444,9 +6403,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.21.0" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +checksum = "e72c1c2cb7b223fafb600a619537a871c2818583d619401b785e7c0b746ccde2" dependencies = [ "base64", "bs58", @@ -6464,9 +6423,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.21.0" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +checksum = "b90c488738ecb4fb0262f41f43bc40efc5868d9fb744319ddf5f5317f417bfac" dependencies = [ "darling 0.23.0", "proc-macro2", @@ -6533,12 +6492,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "shlex" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" - [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -6602,17 +6555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" dependencies = [ "bytemuck", - "read-fonts 0.37.0", -] - -[[package]] -name = "skrifa" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" -dependencies = [ - "bytemuck", - "read-fonts 0.39.2", + "read-fonts", ] [[package]] @@ -6632,9 +6575,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smithay-client-toolkit" @@ -6642,14 +6585,14 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "calloop", "calloop-wayland-source", "cursor-icon", "libc", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "pkg-config", "rustix 1.1.4", "thiserror 2.0.18", @@ -6708,7 +6651,7 @@ dependencies = [ "foreign-types", "js-sys", "log", - "memmap2 0.9.11", + "memmap2 0.9.10", "objc", "raw-window-handle", "redox_syscall 0.5.18", @@ -6736,7 +6679,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", ] [[package]] @@ -6784,20 +6727,20 @@ dependencies = [ [[package]] name = "swash" -version = "0.2.9" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0811b01ca2c4e8718760713911feaf4675c24f94e50530a015ec646cfb622f7c" +checksum = "842f3cd369c2ba38966204f983eaa5e54a8e84a7d7159ed36ade2b6c335aae64" dependencies = [ - "skrifa 0.42.1", + "skrifa", "yazi", "zeno", ] [[package]] name = "syn" -version = "2.0.118" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -6872,9 +6815,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.13.5" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" +checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c" [[package]] name = "tauri-winrt-notification" @@ -6901,7 +6844,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.4.2", "once_cell", "rustix 1.1.4", "windows-sys 0.61.2", @@ -6918,9 +6861,9 @@ dependencies = [ [[package]] name = "test-log" -version = "0.2.21" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9c218384242b5c89b68303ab6f6fc53a312d923f0c14dc6bb860c6aeee40f1" +checksum = "2f46bf474f0a4afebf92f076d54fd5e63423d9438b8c278a3d2ccb0f47f7cdb3" dependencies = [ "env_logger", "test-log-macros", @@ -6929,9 +6872,9 @@ dependencies = [ [[package]] name = "test-log-core" -version = "0.2.21" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c26ef8b00e4d382e59f6a8ddb3cd790b3a5bb29f21a358a9a69ea2f29f13f27b" +checksum = "37d4d41320b48bc4a211a9021678fcc0c99569b594ea31c93735b8e517102b4c" dependencies = [ "proc-macro2", "quote", @@ -6940,9 +6883,9 @@ dependencies = [ [[package]] name = "test-log-macros" -version = "0.2.21" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944ad38adcbb71eaa682c56bceeb079e4ca82b4b3edc2a0fde5cb297b77dac8d" +checksum = "9beb9249a81e430dffd42400a49019bcf548444f1968ff23080a625de0d4d320" dependencies = [ "syn", "test-log-core", @@ -7039,11 +6982,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.52" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e48db7b415311b615f910b3dcaa4557bcd4bf1982379c95c223fd8c2a20e210" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", + "itoa", "js-sys", "num-conv", "powerfmt", @@ -7054,15 +6998,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.31" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -7283,15 +7227,14 @@ dependencies = [ [[package]] name = "trash" -version = "5.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7602e0c7d66ec2d92a8c917219fbc7894039efa2063b9064260110828a356f46" +version = "5.2.2" +source = "git+https://github.com/jackpot51/trash-rs.git?branch=cosmic#a225f753a88e722aeeb27bb2fb00144739911035" dependencies = [ "chrono", "libc", "log", - "objc2 0.6.4", - "objc2-foundation 0.3.2", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "once_cell", "percent-encoding", "scopeguard", @@ -7331,9 +7274,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.20.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "uds_windows" @@ -7424,9 +7367,9 @@ checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" [[package]] name = "unicode-segmentation" -version = "1.13.3" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-vo" @@ -7440,6 +7383,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "url" version = "2.5.8" @@ -7506,11 +7455,10 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.4" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ - "getrandom 0.4.3", "js-sys", "serde_core", "wasm-bindgen", @@ -7573,18 +7521,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.4+wasi-0.2.12" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" dependencies = [ "cfg-if", "once_cell", @@ -7595,9 +7552,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.76" +version = "0.4.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f" dependencies = [ "js-sys", "wasm-bindgen", @@ -7605,9 +7562,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7615,9 +7572,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" dependencies = [ "bumpalo", "proc-macro2", @@ -7628,13 +7585,47 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.14.0", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.15.5", + "indexmap 2.14.0", + "semver", +] + [[package]] name = "wasmtimer" version = "0.4.3" @@ -7669,7 +7660,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "rustix 1.1.4", "wayland-backend", "wayland-scanner", @@ -7681,7 +7672,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cursor-icon", "wayland-backend", ] @@ -7699,11 +7690,11 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.13" +version = "0.32.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +checksum = "563a85523cade2429938e790815fd7319062103b9f4a2dc806e9b53b95982d8f" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-scanner", @@ -7716,7 +7707,7 @@ version = "20250721.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7729,7 +7720,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7742,7 +7733,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7755,7 +7746,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7780,7 +7771,7 @@ version = "0.31.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc1846eb04c49182e04f4a099e2a830a2b745610bbc1d61246e206f29c7000a0" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "downcast-rs", "rustix 1.1.4", "wayland-backend", @@ -7801,9 +7792,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.103" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" dependencies = [ "js-sys", "wasm-bindgen", @@ -7832,7 +7823,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9cb534d5ffd109c7d1135f34cdae29e60eab94855a625dcfe1705f8bc7ad79f" dependencies = [ "arrayvec", - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "cfg-if", "cfg_aliases", @@ -7864,7 +7855,7 @@ dependencies = [ "arrayvec", "bit-set", "bit-vec", - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "cfg_aliases", "document-features", @@ -7924,7 +7915,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.13.0", + "bitflags 2.11.1", "block", "bytemuck", "cfg-if", @@ -7968,7 +7959,7 @@ version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e18308757e594ed2cd27dddbb16a139c42a683819d32a2e0b1b0167552f5840c" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "bytemuck", "js-sys", "log", @@ -8521,7 +8512,7 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" name = "winit" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cfg_aliases", "cursor-icon", "dpi", @@ -8546,7 +8537,7 @@ name = "winit-android" version = "0.31.0-beta.2" dependencies = [ "android-activity", - "bitflags 2.13.0", + "bitflags 2.11.1", "dpi", "ndk", "raw-window-handle", @@ -8559,7 +8550,7 @@ dependencies = [ name = "winit-appkit" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "dpi", @@ -8580,7 +8571,7 @@ dependencies = [ name = "winit-common" version = "0.31.0-beta.2" dependencies = [ - "memmap2 0.9.11", + "memmap2 0.9.10", "objc2 0.6.4", "objc2-core-foundation", "smol_str", @@ -8593,7 +8584,7 @@ dependencies = [ name = "winit-core" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cursor-icon", "dpi", "keyboard-types", @@ -8606,7 +8597,7 @@ dependencies = [ name = "winit-orbital" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "dpi", "libredox", "orbclient", @@ -8621,7 +8612,7 @@ dependencies = [ name = "winit-uikit" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "block2 0.6.2", "dispatch2", "dpi", @@ -8641,12 +8632,12 @@ name = "winit-wayland" version = "0.31.0-beta.2" dependencies = [ "ahash", - "bitflags 2.13.0", + "bitflags 2.11.1", "calloop", "cursor-icon", "dpi", "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "raw-window-handle", "rustix 1.1.4", "sctk-adwaita", @@ -8666,7 +8657,7 @@ name = "winit-web" version = "0.31.0-beta.2" dependencies = [ "atomic-waker", - "bitflags 2.13.0", + "bitflags 2.11.1", "concurrent-queue", "cursor-icon", "dpi", @@ -8686,7 +8677,7 @@ dependencies = [ name = "winit-win32" version = "0.31.0-beta.2" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "cursor-icon", "dpi", "raw-window-handle", @@ -8706,12 +8697,100 @@ dependencies = [ "memchr", ] +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + [[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck 0.5.0", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck 0.5.0", + "indexmap 2.14.0", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "indexmap 2.14.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.14.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + [[package]] name = "write16" version = "1.0.0" @@ -8801,7 +8880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" dependencies = [ "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "xkeysym", ] @@ -8812,7 +8891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d" dependencies = [ "libc", - "memmap2 0.9.11", + "memmap2 0.9.10", "xkeysym", ] @@ -8822,7 +8901,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.13.0", + "bitflags 2.11.1", "dlib", "log", "once_cell", @@ -8885,9 +8964,9 @@ checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5" [[package]] name = "yoke" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -8946,9 +9025,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.16.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee682d202a77e4a9f3b2c2bdf48a7b28af5c08c34ddf66f98c93e5e39464285" +checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1" dependencies = [ "async-broadcast", "async-executor", @@ -8975,9 +9054,9 @@ dependencies = [ "uuid", "windows-sys 0.61.2", "winnow", - "zbus_macros 5.16.0", + "zbus_macros 5.15.0", "zbus_names 4.3.2", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -8987,7 +9066,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" dependencies = [ "zbus_xml", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -9001,7 +9080,7 @@ dependencies = [ "syn", "zbus-lockstep", "zbus_xml", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -9019,17 +9098,17 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.16.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf1bd45a81a103745b1757754762a26e8cd01e4532e4d6c8ec431624b80d1d6" +checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn", "zbus_names 4.3.2", - "zvariant 5.12.0", - "zvariant_utils 3.4.0", + "zvariant 5.11.0", + "zvariant_utils 3.3.1", ] [[package]] @@ -9051,7 +9130,7 @@ checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d" dependencies = [ "serde", "winnow", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -9063,7 +9142,7 @@ dependencies = [ "quick-xml 0.39.4", "serde", "zbus_names 4.3.2", - "zvariant 5.12.0", + "zvariant 5.11.0", ] [[package]] @@ -9074,18 +9153,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.52" +version = "0.8.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +checksum = "bce33a6288fa3f072a8c2c7d0f2fdbb90e28298f0135c1f99b96c3db2efcc60b" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.52" +version = "0.8.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +checksum = "8fd425244944f4ab65ccff928e7323354c5a018c75838362fdce749dfad2ee1e" dependencies = [ "proc-macro2", "quote", @@ -9115,9 +9194,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.9.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" @@ -9166,7 +9245,7 @@ dependencies = [ "crc32fast", "deflate64", "flate2", - "getrandom 0.4.3", + "getrandom 0.4.2", "hmac", "indexmap 2.14.0", "lzma-rust2", @@ -9183,9 +9262,9 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.6.4" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977347db8caa080403f6b6b7c1cda9479a8e869316f7e13a59b19076a40f94e3" +checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" [[package]] name = "zmij" @@ -9287,17 +9366,17 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.12.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a192a0bde63360d77a7523c833d4b4ce6070a927e2c53246e4c540b1a3e27be0" +checksum = "1c1567a6ec68df868cbbfde844cfc6d81649fe5109a62b116b19fabd53e618ee" dependencies = [ "endi", "enumflags2", "serde", "url", "winnow", - "zvariant_derive 5.12.0", - "zvariant_utils 3.4.0", + "zvariant_derive 5.11.0", + "zvariant_utils 3.3.1", ] [[package]] @@ -9315,15 +9394,15 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "5.12.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc6cde9c01c511074be97f7ccb6c19d0da89e3f8662e812e999dcfd4638737" +checksum = "c7d5b780599bbde114e39d9a0799577fad1ced5105d38515745f7b3099d8ceda" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn", - "zvariant_utils 3.4.0", + "zvariant_utils 3.3.1", ] [[package]] @@ -9339,9 +9418,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.4.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8535915cfa75547e559d8c68e8139909a4aeee076831e4ef7fc59d8172c4d6" +checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691" dependencies = [ "proc-macro2", "quote", @@ -9350,21 +9429,6 @@ dependencies = [ "winnow", ] -[[patch.unused]] -name = "dnd" -version = "0.1.0" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#af8e6a872d8ac4956e044b9cb05a615a48261a57" - -[[patch.unused]] -name = "mime" -version = "0.1.0" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#af8e6a872d8ac4956e044b9cb05a615a48261a57" - -[[patch.unused]] -name = "window_clipboard" -version = "0.4.1" -source = "git+https://forge.aditua.com/leyoda/window_clipboard.git?branch=yoda-x11-optional#af8e6a872d8ac4956e044b9cb05a615a48261a57" - [[patch.unused]] name = "winit-x11" version = "0.31.0-beta.2" diff --git a/Cargo.toml b/Cargo.toml index a6b6dde..95dd3d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files" -version = "1.2.0" +version = "1.0.14" authors = ["Jeremy Soller "] edition = "2024" license = "GPL-3.0-only" @@ -11,7 +11,7 @@ anyhow = "1" jiff = "0.2" jiff-icu = "0.2" icu = { version = "2.2.0", features = ["compiled_data"] } -cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "c253ec1", optional = true } +cctk = { path = "../cosmic-protocols/client-toolkit", package = "cosmic-client-toolkit", optional = true } cosmic-mime-apps = { git = "https://github.com/pop-os/cosmic-mime-apps.git", optional = true } dirs = "6.0.0" gio = { version = "0.21", optional = true } @@ -33,7 +33,7 @@ shlex = { version = "1.3" } tempfile = "3" tikv-jemallocator = { version = "0.6", optional = true } tokio = { version = "1", features = ["process", "sync"] } -trash = "5.2.6" +trash = { git = "https://github.com/jackpot51/trash-rs.git", branch = "cosmic" } url = "2.5" walkdir = "2.5.0" wayland-client = { version = "0.31.14", optional = true } @@ -56,7 +56,6 @@ slotmap = "1.1.1" recently-used-xbel = "1.2.0" zip = "8" md-5 = "0.10.6" -sha2 = "0.10" png = "0.18" jxl-oxide = { version = "0.12.5", features = ["image"] } num_cpus = "1.17.0" @@ -151,17 +150,6 @@ tokio = { version = "1", features = ["rt", "macros"] } # no [patch] block needed anymore. Keeping the block below would be a no-op # since nothing in the dep graph still asks for pop-os/libcosmic.git. -# Yoda wayland cut: redirect window_clipboard (x11 gated behind opt-in -# feature) to our public Forgejo fork and cosmic-text to the local checkout -# carrying PR#503 plus the EAW monospace width fix. The window_clipboard patch -# is needed to consolidate the -# upstream pop-os/libcosmic chain (pulled by cosmic-settings-daemon) onto -# the same fork iced uses, otherwise cargo compiles two versions. -[patch.'https://github.com/pop-os/window_clipboard.git'] -window_clipboard = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } -dnd = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } -mime = { git = "https://forge.aditua.com/leyoda/window_clipboard.git", branch = "yoda-x11-optional" } - [patch.'https://github.com/pop-os/cosmic-text.git'] cosmic-text = { path = "../cosmic-text" } diff --git a/cosmic-files-applet/Cargo.toml b/cosmic-files-applet/Cargo.toml index b4f5bcc..b802913 100644 --- a/cosmic-files-applet/Cargo.toml +++ b/cosmic-files-applet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files-applet" -version = "1.2.0" +version = "1.0.14" edition = "2024" [dependencies] diff --git a/debian/changelog b/debian/changelog index 0dbce82..347d255 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,27 +1,3 @@ -cosmic-files (1.2.0) noble; urgency=medium - - * Epoch 1.2.0 version update - - -- Jeremy Soller Tue, 30 Jun 2026 12:21:07 -0600 - -cosmic-files (1.1.0) noble; urgency=medium - - * Epoch 1.1.0 version update - - -- Jeremy Soller Tue, 23 Jun 2026 08:47:18 -0600 - -cosmic-files (1.0.16) noble; urgency=medium - - * Epoch 1.0.16 version update - - -- Jeremy Soller Tue, 09 Jun 2026 10:26:05 -0600 - -cosmic-files (1.0.15) noble; urgency=medium - - * Epoch 1.0.15 version update - - -- Jeremy Soller Tue, 02 Jun 2026 11:02:29 -0600 - cosmic-files (1.0.14) noble; urgency=medium * Epoch 1.0.14 version update diff --git a/i18n/ca/cosmic_files.ftl b/i18n/ca/cosmic_files.ftl index f37cc18..48e7033 100644 --- a/i18n/ca/cosmic_files.ftl +++ b/i18n/ca/cosmic_files.ftl @@ -1,11 +1,11 @@ cosmic-files = Fitxers del COSMIC empty-folder = Carpeta buida -empty-folder-hidden = Carpeta buida (conté elements ocults) +empty-folder-hidden = Carpeta buida (té elements ocults) no-results = No s'ha trobat cap resultat filesystem = Sistema de fitxers home = Inici networks = Xarxes -notification-in-progress = Operacions de fitxers en curs +notification-in-progress = Hi ha operacions amb fitxers en curs. trash = Paperera recents = Recents undo = Desfés @@ -29,14 +29,14 @@ details = Detalls dismiss = Descarta el missatge operations-running = { $running } { $running -> - [one] operació + [one] operacion *[other] operacions } en curs ({ $percent }%)... operations-running-finished = { $running }{ $running -> - [one] operació + [one] operacion *[other] operacions - } en curs ({ $percent }%), { $finished } acabada/es... + } en curs ({ $percent }%), { $finished } acabat... pause = Pausa resume = Reprèn @@ -54,7 +54,7 @@ extract-password-required = Cal una contrasenya ## Empty Trash Dialog empty-trash = Buida la paperera -empty-trash-warning = Els elements dins la Paperera s'eliminaran permanentment +empty-trash-warning = Voleu suprimir permanentment tots els fitxers de la paperera? ## Mount Error Dialog @@ -64,12 +64,12 @@ mount-error = No es pot accedir a la unitat create-new-file = Crea un nou fitxer create-new-folder = Crea una nova carpeta -file-name = Nom del fitxer +file-name = Nom del fixer folder-name = Nom de la carpeta -file-already-exists = Ja existeix un fitxer amb aquest nom -folder-already-exists = Ja existeix una carpeta amb aquest nom -name-hidden = Els noms que comencin amb "." s'ocultaran. -name-invalid = El nom no pot ser "{ $filename }" +file-already-exists = Ja existeix un fitxer amb aquest nom. +folder-already-exists = Ja existeix una carpeta amb aquest nom. +name-hidden = Els noms que comencin amb "." seran ocults. +name-invalid = El nom no pot ser "{ $filename }". name-no-slashes = El nom no pot contenir barres. ## Open/Save Dialog @@ -353,13 +353,3 @@ sort-oldest-first = Primer més antics sort-smallest-to-largest = De petit a gran sort-largest-to-smallest = De gran a petit run = Executa -extract-to-title = Extreu a una carpeta -empty-trash-title = Voleu buidar la paperera? -extract-to = Extreu a... -delete = Suprimeix -comment = Gestor de fitxers de l'escriptori COSMIC -copy-to-title = Escolliu el destí de la còpia -copy-to-button-label = Copia -move-to-title = Escolliu el destí del trasllat -move-to-button-label = Mou -keywords = Carpeta;Fitxers;Arxius;Gestor;Explorador; diff --git a/i18n/en/cosmic_files.ftl b/i18n/en/cosmic_files.ftl index 129e6f9..489ff7a 100644 --- a/i18n/en/cosmic_files.ftl +++ b/i18n/en/cosmic_files.ftl @@ -309,9 +309,6 @@ item-created = Created: {$created} item-modified = Modified: {$modified} item-accessed = Accessed: {$accessed} calculating = Calculating... -checksum = {$kind} checksum -calculate = Calculate -error = Error ## Settings settings = Settings diff --git a/i18n/hu/cosmic_files.ftl b/i18n/hu/cosmic_files.ftl index dfdbf44..c81703b 100644 --- a/i18n/hu/cosmic_files.ftl +++ b/i18n/hu/cosmic_files.ftl @@ -17,7 +17,7 @@ desktop-view-options = Asztali nézet beállításai… show-on-desktop = Megjelenítés az asztalon desktop-folder-content = Asztal mappa tartalma mounted-drives = Csatolt meghajtók -trash-folder-icon = Kuka ikon +trash-folder-icon = Kuka ikonja icon-size-and-spacing = Ikonméret és távolság icon-size = Ikonméret grid-spacing = Rácsköz @@ -57,8 +57,8 @@ extract-to-title = Kibontási cél kiválasztása ## Empty Trash Dialog -empty-trash = A Kuka ürítése -empty-trash-warning = A Kukában lévő összes elem véglegesen törölve lesz +empty-trash = Kuka ürítése +empty-trash-warning = A kukában lévő összes elem véglegesen törölve lesz ## Mount Error Dialog @@ -103,7 +103,7 @@ related-apps = Hasonló alkalmazások selected-items = A(z) { $items } kijelölt elem permanently-delete-question = Végleges törlés? delete = Törlés -permanently-delete-warning = { $target } véglegesen törölve lesz. A művelet nem vonható vissza. +permanently-delete-warning = { $target } véglegesen törölve lesz. A művelet nem visszavonható. ## Rename Dialog @@ -251,13 +251,13 @@ deleting = { $items } { $items -> [one] elem *[other] elem - } törlése a Kukából ({ $progress })… + } törlése a kukából ({ $progress })… deleted = { $items } { $items -> [one] elem *[other] elem - } törölve a Kukából -emptying-trash = { trash } ürítése ({ $progress })… + } törölve a kukából +emptying-trash = { trash } kiürítése ({ $progress })… emptied-trash = { trash } kiürítve extracting = { $items } { $items -> @@ -309,12 +309,12 @@ restoring = { $items } { $items -> [one] elem *[other] elem - } visszaállítása a Kukából ({ $progress })… + } visszaállítása a kukából ({ $progress })… restored = { $items } { $items -> [one] elem *[other] elem - } visszaállítva a Kukából + } visszaállítva a kukából unknown-folder = ismeretlen mappa ## Open with @@ -349,7 +349,7 @@ light = Világos ### Type to Search type-to-search = Gépeléssel keresés -type-to-search-recursive = Keresés a jelenlegi mappában és az almappákban +type-to-search-recursive = Keresés a jelenlegi mappában és almappákban type-to-search-enter-path = Elérési út megnyitása # Context menu add-to-sidebar = Hozzáadás az oldalsávhoz @@ -360,8 +360,8 @@ extract-here = Kibontás new-file = Új fájl… new-folder = Új mappa… open-in-terminal = Megnyitás a terminálban -move-to-trash = Áthelyezés a Kukába -restore-from-trash = Visszaállítás a Kukából +move-to-trash = Kukába helyezés +restore-from-trash = Visszaállítás a kukából remove-from-sidebar = Eltávolítás az oldalsávról sort-by-name = Név szerinti rendezés sort-by-modified = Módosítás szerinti rendezés @@ -372,7 +372,7 @@ remove-from-recents = Eltávolítás a legutóbbiak közül ## Desktop change-wallpaper = Háttérkép cseréje… -desktop-appearance = Asztal megjelenése… +desktop-appearance = Asztali megjelenés… display-settings = Kijelzőbeállítások… # Menu @@ -422,7 +422,7 @@ sort-largest-to-smallest = Legnagyobbtól a legkisebbig repository = Tároló support = Támogatás progress-failed = { $percent }%, sikertelen -empty-trash-title = Kiüríted a Kukát? +empty-trash-title = Kuka ürítése? type-to-search-select = Kijelöli az első egyező fájlt vagy mappát pasted-image = Beillesztett kép pasted-text = Beillesztett szöveg diff --git a/i18n/id/cosmic_files.ftl b/i18n/id/cosmic_files.ftl index 3300d25..aefff98 100644 --- a/i18n/id/cosmic_files.ftl +++ b/i18n/id/cosmic_files.ftl @@ -327,4 +327,3 @@ context-action-confirm-warning = [one] item *[other] item }. -rename-confirm = Ganti nama diff --git a/i18n/kk/cosmic_files.ftl b/i18n/kk/cosmic_files.ftl index 0ee3ffe..8aabf01 100644 --- a/i18n/kk/cosmic_files.ftl +++ b/i18n/kk/cosmic_files.ftl @@ -327,4 +327,3 @@ context-action-confirm-warning = *[other] нәрсеге }. run = Орындау -rename-confirm = Атын өзгерту diff --git a/i18n/kmr/cosmic_files.ftl b/i18n/kmr/cosmic_files.ftl index 6c08bd0..e69de29 100644 --- a/i18n/kmr/cosmic_files.ftl +++ b/i18n/kmr/cosmic_files.ftl @@ -1,330 +0,0 @@ -sort-newest-first = Pêşî ya herî nû -connect = Girê bide -deleted = - { $items } hat jêbirin{ $items -> - [one] hêman - *[other] hêman - } ji { trash } -dismiss = Peyamê paşguh bike -list-view = Dîtina lîsteyê -copy_noun = Jê bigire -favorite-path-error = Şaşetiya vekirina rêgehê -progress = { $percent }% -open-file = Pelê veke -remove-from-sidebar = Ji benda kêlekê rake -related-apps = Bernameyên têkildar -network-drive-error = Nikaribû bigihêje ajokarê torê -gallery-preview = Pêşdîtina galeriyê -sort-smallest-to-largest = Biçûktir bo mezintir -zoom-in = Nêzîk bike -select-all = Hemûyan hilbijêre -removing-from-recents = - { $items } tê rakirin { $items -> - [one] hêman - *[other] hêman - } ji { recents } -password = Borînpeyv -cosmic-files = Pelên COSMIC -emptying-trash = { trash } tê valakirin({ $progress })... -new-window = Çarçoveya nû -remove = Rake -zoom-out = Dûr bike -compressing = - { $items } tê guvaştin { $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" ({ $progress })... -move-to-trash = Bilivîne bo jêbirdankê -menu-about = Derbarê Pelên COSMIC... -file-already-exists = Pelek bi heman navî jixwe heye -setting-executable-and-launching = "{ $name }" wekî pelê xebitandinê tê sazkirin û xebitandin -open-multiple-files = Gelek pelan veke -default-size = Mezinahiya berdest -name-hidden = Navên ku bi "." tê destpêkirin wê werin veşartin -extracted = - { $items } hate derxistin { $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" -create-new-folder = Peldanka nû biafrîne -folder-already-exists = Peldankek bi heman navî jixwe heye -create-archive = Erşîvê biafrîne -permanently-delete-warning = { $target } wê bi mayînde were jêbirin û nayê vegerandin. -favorite-path-error-description = - Nikaribû "{ $path }" veke. - "{ $path }" dibe ku tune be yan jî mafê te yê - vekirina wê tune be. - Tu dixwazî wê ji benda kêlekê rakî? -empty-trash-warning = Hêmanên di jêbirdankê de wê bi mayînde werin jêbirin -other-apps = Bernameyên din -set-permissions = Maf hatine sazkirin ji bo "{ $name }" bo { $mode } -quit = Biqedîne -sort-by-size = Li gorî mezinahiyê rêz bike -rename = Navê biguhêrîne... -empty-folder-hidden = Peldanka vala (tiştên veşartî tê de hene) -keep = Bihêle -operations-running = - { $running } { $running -> - [one] pêvajo - *[other] pêvajo - } dixebite ({ $percent }%)... -permanently-deleting = - { $items } bi mayînde tê jêbirin { $items -> - [one] hêman - *[other] hêman - } -edit = Biguhêrîne -copy = Jê bigire -none = Ne yek -no-results = Tu encam nehatin dîtin -theme = Rûkar -compressed = - { $items } hate guvaştin{ $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" -appearance = Xuyang -rename-folder = Navê peldankê biguherîne -new-file = Pela nû... -close-tab = Rûgerê bigire -open-in-terminal = Di termînalê de veke -open-multiple-folders = Gelek peldankan veke -remember-password = Borînpeyvê bi bîr bîne -username = Navê bikarhêner -light = Ronî -extract-to = Derxîne bo... -add-network-drive = Ajokarê torê tevlî bike -copying = - { $items } tê jêgirtin{ $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" ({ $progress })... -create-new-file = Pelê nû biafrîne -sort-by-trashed = Li gorî demê rêz bike -support = Piştgirî -try-again = Dîsa hewl bide -eject = Biavêje -copied = - { $items } hate jêgirtin { $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" -open-in-new-window = Di çarçoveyeke nû de veke -empty-folder = Peldanka vala -empty-trash = Jêbirdankê vala bike -sort-by-modified = Li gorî guhertinê rêz bike -list-directories-first = Pêşî rêgehan lîste bike -folder-name = Navê peldankê -browse-store = { $store } bigere -remove-from-recents = Ji dawiyê rake -paste = Pêve bike -empty-trash-title = Jêbirdankê vala bike? -menu-settings = Sazkarî... -moving = - { $items } tê livandin{ $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" ({ $progress })... -change-wallpaper = Wêneyê dîwêr biguhêrîne... -network-drive-description = - Di nav navnîşanên rajekarê de pêşgira protokolekê û navnîşanek heye. - Mînak: ssh://192.168.0.1, ftp://[2001:db8::1] -deleting = - { $items } tê jêbirin { $items -> - [one] hêman - *[other] hêman - } ji { trash } ({ $progress })... -single-click = Tikandina yekane bo vekriinê -view = Dîtin -setting-permissions = Maf tên sazkirin ji bo "{ $name }" bo { $mode } -creating = "{ $name }" tê afirandin di "{ $parent }" de -execute-only = Tenê xebitandin -open-item-location = Cihê hêmanê veke -type-to-search = Bo lêgerînê binivîse -set-executable-and-launched = "{ $name }" wekî pelê xebitandinê hat sazkirin û xebitandin -mounted-drives = Ajokarên siwarkirî -sort-a-z = A-Z -mount-error = Nikare bigihêje ajokerê -extract-here = Derxîne -grid-view = Dîtina torê -add-to-sidebar = Tevlî benda kêlekê bike -dark = Tarî -notification-in-progress = Pêvajoyên pelê didome -home = Rûpela sereke -sort-z-a = Z-A -type-to-search-recursive = Di peldank û binpeldankên heyî de digere -history = Dîrok -progress-paused = { $percent }%, hate rawestandin -desktop-view-options = Vebijêrkên dîtina sermaseyê... -show-on-desktop = Li ser sermaseyê nîşan bide -cancelled = Têkbirî -new-folder = Peldankan nû... -match-desktop = Li gorî sermaseyê -name-no-slashes = Nav nabe ku "/" tê de hebe -operations-running-finished = - { $running } { $running -> - [one] pêvajo - *[other] pêvajo - } dixebite ({ $percent }%), { $finished } qediya... -sort-by-name = Li gorî navê rêz bike -edit-history = Dîrokê biguhêrînê -show-hidden-files = Pelên veşartî nîşan bide -progress-failed = { $percent }%, têk çû -trash-folder-icon = Îkona peldanka jêbirdankê -extract-to-title = Derxîne bo peldankê -icon-size = Mezinahiya îkonê -open-with-title = Tu çawa dixwazî "{ $name }" vekî? -extracting = - { $items } tê derxistin { $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo"{ $to }" ({ $progress })... -settings = Sazkarî -complete = Qediya -permanently-delete-question = Bi mayînde jê bibe? -extract-password-required = Borînpeyv pêdivî ye -pending = Li bendê ye -desktop-folder-content = Naveroka peldanka sermaseyê -no-history = Tu hêman di dîrok de tune ne. -open-folder = Peldankê veke -emptied-trash = { trash } hate valakirin -rename-file = Navê pelê biguherîne -sort-largest-to-smallest = Mezintir bo biçûktir -restore-from-trash = Ji jêbirdankê vegerîne -cut = Jê bike -moved = - { $items } hate livandin { $items -> - [one] hêman - *[other] hêman - } ji "{ $from }" bo "{ $to }" -progress-cancelled = { $percent }%, hat têkbirin -open-in-new-tab = Di rûgerê nû de veke -file = Pel -file-name = Navê pelê -save-file = Pelê tomar bike -created = "{ $name }" hate afirandin di "{ $parent }" de -delete-permanently = Bi mayînde jê bibe -display-settings = Sazkariyên dîmenderê... -new-tab = Rûgera nû -failed = Têk çû -name-invalid = Nav nabe ku \"{ $filename }\" be -desktop-appearance = Xuyanga sermaseyê... -comment = Rêveberê pelê ji bo sermaseya COSMIC -keywords = Rêveber;Peldank; -filesystem = Pergala pelê -networks = Tor -recents = Dawî -open = Veke -cancel = Têk bibe -trash = Jêbirdank -undo = Vegerîne -today = Îro -name = Nav -modified = Guhertî -size = Mezinahî -details = Hûrgilî -pause = Rawestîne -resume = Bidomîne -copy-to-title = Rêgeha jêgirtinê hilbijêre -copy-to-button-label = Jê bigire -move-to-title = Rêgeha livandinê hilbijêre -move-to-button-label = Bilivîne -create = Biafrîne -save = Tomar bike -context-action = Çalakiya naverokê -context-action-confirm-title = "{ $name }" bixebtîne? -context-action-confirm-warning = - Ev ê li ser { $items } { $items -> - [one] hêman - *[other] hêman - } bixebite. -run = Bixebitîne -selected-items = { $items } hêmanên hilbijartî -delete = Jê bibe -rename-confirm = Navê biguherîne -pasted-image = Wêneya pêvekirî -pasted-text = Nivîsa pêvekirî -pasted-video = Vîdiyoya pêvekirî -copy-path = Rêgehê jê bigire -show-recents = Peldanka dawî di benda kêlekê de -clear-recents-history = Dîroka dawî pak bike -compress = Biguvşîne... -copy-to = Jê bigire bo... -move-to = Bilivîne bo... -default-app = { $name } (berdest) -renamed = Nav hate guhertin ji "{ $from }" bo "{ $to }" -read-execute = Xwendin û xebitandin -item-modified = Guhertin: { $modified } -reload-folder = Peldankê ji nû ve bar bike -restoring = - { $items } tê vegerandin { $items -> - [one] hêman - *[other] hêman - } ji { trash } ({ $progress })... -icon-size-and-spacing = Mezinahiya îkonan û valahiya di navbera wan de -type-to-search-enter-path = Riya rêgehê yan jî pelê têdixîne -menu-open-with = Veke bi... -original-file = Pelê resen -read-write-execute = Xwendin, nivîsandin û xebitandin -calculating = Tê jimartin... -item-size = Mezinahî: { $size } -connecting = Tê girêdan... -read-write = Xwendin û nivîsandin -items = Hêman: { $items } -type = Cûre: { $mime } -replace-warning = Tu dixwazî bi ya ku tu niha tomar dikî biguhêrînî? Naveroka berê wê were jêbirin. -show-details = Hûrgiliyan nîşan bide -grid-spacing = Valahiya torê -sort-oldest-first = Pêşî ya herî kevn -repository = Embar -replace-warning-operation = Tu dixwazî biguherînî? Naveroka berê wê were jêbirin. -other = Ên din -read-only = Tenê xwendin -enter-server-address = Navnîşana rajekarê têxîne -connect-anonymously = Bi awayekî anonîm girê bide -group = Kom -apply-to-all = Bo hemûyan bisepîne -skip = Derbas bike -replace-with = Biguhêrîne bi -owner = Xwedî -set-and-launch = Saz bike û dest pê bike -removed-from-recents = - { $items } hate rakirin { $items -> - [one] hêman - *[other] hêman - } ji { recents } -item-created = Afirandin:{ $created } -network-drive-schemes = - Protokolên berdest,pêşgirê - AppleTalk,afp:// - Protokola şandina pelê,ftp:// an ftps:// - Pergala pelê torê,nfs:// - Astengiya peyama rajekarê,smb:// - SSH protokola şandina pelê,sftp:// an ssh:// - WebDAV, dav:// an davs:// -set-executable-and-launch = Wekî pelê xebitandinê saz bike û bixebitîne -restored = - { $items } hate vegerandin { $items -> - [one] hêman - *[other] hêman - } ji { trash } -domain = Navper -sort = Rêz bike -item-accessed = Gihîştin: { $accessed } -open-with = Veke bi -keep-both = Herduyan bihêle -permanently-deleted = - { $items } bi mayînde hate jêbirin{ $items -> - [one] hêman - *[other] hêman - } -write-execute = Nivîsandin û xebitandin -renaming = Navê ji "{ $from }" biguhêrîne bo "{ $to }" -set-executable-and-launch-description = Tu dixwazî "{ $name }" wekî pelê xebitandinê saz bikî û bixebtînî? -replace = Biguhêrîne -replace-title = "{ $filename }" jixwe di vê cihê de heye -unknown-folder = Peldanka nenas -write-only = Tenê nivîsandin -trashed-on = Li Jêbirdankê hatiye avêtin -mixed = Tevlihev -type-to-search-select = Pel an peldanka yekem a lihevhatî hildibijêre diff --git a/i18n/pt/cosmic_files.ftl b/i18n/pt/cosmic_files.ftl index b0c7e30..447487e 100644 --- a/i18n/pt/cosmic_files.ftl +++ b/i18n/pt/cosmic_files.ftl @@ -1,12 +1,12 @@ cosmic-files = Ficheiros COSMIC comment = Gerenciador de arquivos do COSMIC -keywords = Pasta;Gestor; +keywords = Pastas;Gerenciador;Arquivos;Gestor;Explorer; empty-folder = Pasta vazia empty-folder-hidden = Pasta vazia (tem ficheiros ocultos) no-results = Nenhum resultado encontrado filesystem = Sistema de ficheiros home = Pasta Pessoal -notification-in-progress = Operações em curso +notification-in-progress = Operações em curso. trash = Lixo undo = Anular # List view @@ -204,7 +204,7 @@ desktop-view-options = Opções de visualização da área de trabalho... show-on-desktop = Mostrar na área de trabalho desktop-folder-content = Conteúdo da pasta da área de trabalho mounted-drives = Dispositivos montados -trash-folder-icon = Ícone da pasta lixo +trash-folder-icon = Ícone do lixo icon-size-and-spacing = Tamanho e espaçamento do ícone icon-size = Tamanho do ícone grid-spacing = Espaçamento entre ícones diff --git a/i18n/sr/cosmic_files.ftl b/i18n/sr/cosmic_files.ftl index 98a9e35..b71afe5 100644 --- a/i18n/sr/cosmic_files.ftl +++ b/i18n/sr/cosmic_files.ftl @@ -327,4 +327,3 @@ compress = Сажми... copy-to = Умножи у... move-to = Помери у... copy-path = Умножи путању -rename-confirm = Преименуј diff --git a/i18n/uk/cosmic_files.ftl b/i18n/uk/cosmic_files.ftl index 31b4103..9f23949 100644 --- a/i18n/uk/cosmic_files.ftl +++ b/i18n/uk/cosmic_files.ftl @@ -388,4 +388,3 @@ context-action-confirm-warning = }. context-action = Контекстна дія rename-confirm = Перейменувати -mixed = Змішано diff --git a/justfile b/justfile index 5e8d024..9522e98 100644 --- a/justfile +++ b/justfile @@ -48,7 +48,7 @@ build-debug *args: # Compiles with release profile build-release *args: (build-debug '--release' args) - + # Compiles applet with release profile build-release-applet *args: cargo build --package {{applet-name}} --release {{args}} @@ -111,7 +111,7 @@ uninstall: vendor: #!/usr/bin/env bash mkdir -p .cargo - cargo vendor --locked --sync Cargo.toml | head -n -1 > .cargo/config.toml + cargo vendor --sync Cargo.toml | head -n -1 > .cargo/config.toml echo 'directory = "vendor"' >> .cargo/config.toml echo >> .cargo/config.toml echo '[env]' >> .cargo/config.toml diff --git a/src/app.rs b/src/app.rs index 0e572a0..270979c 100644 --- a/src/app.rs +++ b/src/app.rs @@ -73,7 +73,7 @@ use crate::config::{ use crate::dialog::{Dialog, DialogKind, DialogMessage, DialogResult, DialogSettings}; use crate::key_bind::key_binds; use crate::localize::LANGUAGE_SORTER; -use crate::mime_app::{self, MimeApp, MimeAppCache, MimeAppMatch}; +use crate::mime_app::{MimeApp, MimeAppCache}; use crate::mounter::{ MOUNTERS, MounterAuth, MounterItem, MounterItems, MounterKey, MounterMessage, }; @@ -260,8 +260,6 @@ pub enum Action { HistoryPrevious, ItemDown, ItemLeft, - ItemPageDown, - ItemPageUp, ItemRight, ItemUp, LocationUp, @@ -335,8 +333,6 @@ impl Action { Self::HistoryPrevious => Message::TabMessage(entity_opt, tab::Message::GoPrevious), Self::ItemDown => Message::TabMessage(entity_opt, tab::Message::ItemDown), Self::ItemLeft => Message::TabMessage(entity_opt, tab::Message::ItemLeft), - Self::ItemPageDown => Message::TabMessage(entity_opt, tab::Message::ItemPageDown), - Self::ItemPageUp => Message::TabMessage(entity_opt, tab::Message::ItemPageUp), Self::ItemRight => Message::TabMessage(entity_opt, tab::Message::ItemRight), Self::ItemUp => Message::TabMessage(entity_opt, tab::Message::ItemUp), Self::LocationUp => Message::TabMessage(entity_opt, tab::Message::LocationUp), @@ -526,7 +522,6 @@ pub enum Message { PendingPauseAll(bool), PermanentlyDelete(Option), Preview(Option), - ReloadMimeAppCache, ReorderTab(ReorderEvent), RescanRecents, RescanTrash, @@ -686,7 +681,7 @@ pub enum DialogPage { path: PathBuf, mime: mime_guess::Mime, selected: usize, - store_opt: Option>, + store_opt: Option, /// When true, the chosen app is written to mimeapps.list as the /// default handler for `mime` after it spawns. set_default: bool, @@ -785,6 +780,13 @@ impl DialogPages { pub struct FavoriteIndex(usize); +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +enum MimeAppMatch { + Exact, + Related, + Other, +} + pub struct MounterData(MounterKey, MounterItem); #[derive(Clone, Debug)] @@ -1012,6 +1014,7 @@ impl App { #[cfg(feature = "desktop")] fn launch_desktop_entries(paths: &[impl AsRef]) { + use crate::mime_app; use cosmic::desktop::fde::DesktopEntry; let locales = cosmic::desktop::fde::get_languages_from_env(); @@ -1139,12 +1142,6 @@ impl App { .and_then(|first| first.as_ref().parent()) .map(Path::to_path_buf) { - let mut tasks = Vec::new(); - if let Some(old_dialog) = self.file_dialog_opt.take() { - let old_id = old_dialog.window_id(); - self.windows.remove(&old_id); - tasks.push(window::close(old_id)); - } let (mut dialog, dialog_task) = Dialog::new( DialogSettings::new() .kind(DialogKind::OpenFolder) @@ -1161,9 +1158,7 @@ impl App { ))), ); self.file_dialog_opt = Some(dialog); - tasks.push(set_title_task); - tasks.push(dialog_task); - Task::batch(tasks) + Task::batch([set_title_task, dialog_task]) } else { Task::none() } @@ -2574,6 +2569,45 @@ impl App { col.into() } + fn get_apps_for_mime(&self, mime_type: &Mime) -> Vec<(&MimeApp, MimeAppMatch)> { + let mut results = Vec::new(); + + let mut dedupe = FxHashSet::default(); + + // start with exact matches + results.extend( + self.mime_app_cache + .get(mime_type) + .iter() + .filter(|&mime_app| dedupe.insert(&mime_app.id)) + .map(|mime_app| (mime_app, MimeAppMatch::Exact)), + ); + + // grab matches based off of subclass / parent mime type + if let Some(parent_types) = mime_icon::parent_mime_types(mime_type) { + for parent_type in parent_types { + results.extend( + self.mime_app_cache + .get(&parent_type) + .iter() + .filter(|&mime_app| dedupe.insert(&mime_app.id)) + .map(|mime_app| (mime_app, MimeAppMatch::Related)), + ); + } + } + + // Add other apps + results.extend( + self.mime_app_cache + .apps() + .iter() + .filter(|&mime_app| dedupe.insert(&mime_app.id)) + .map(|mime_app| (mime_app, MimeAppMatch::Other)), + ); + + results + } + // Update favorites based on renaming or moving dirs. fn update_favorites(&mut self, path_changes: &[(impl AsRef, impl AsRef)]) -> bool { let mut favorites_changed = false; @@ -3489,7 +3523,7 @@ impl Application for App { set_default, .. } => { - let available_apps = self.mime_app_cache.get_apps_for_mime(&mime, true); + let available_apps = self.get_apps_for_mime(&mime); if let Some((app, _)) = available_apps.get(selected) { if let Some(mut command) = @@ -3629,7 +3663,7 @@ impl Application for App { if self.core.main_window_id() == Some(window_id) || in_surface_ids { let entity = self.tab_model.active(); for (key_bind, action) in &self.key_binds { - if key_bind.matches(modifiers, &key, Some(&physical_key)) { + if key_bind.matches(modifiers, &key, None) { return self.update(action.message(Some(entity))); } } @@ -4497,9 +4531,6 @@ impl Application for App { let paths: Box<[_]> = self.selected_paths(entity_opt).collect(); return self.operation(Operation::RemoveFromRecents { paths }); } - Message::ReloadMimeAppCache => { - self.mime_app_cache.reload(); - } Message::RescanRecents => { return self.rescan_recents(); } @@ -6322,7 +6353,7 @@ impl Application for App { }; let mut column = widget::list_column(); - let available_apps = self.mime_app_cache.get_apps_for_mime(mime, true); + let available_apps = self.get_apps_for_mime(mime); let item_height = 32.0; let mut displayed_default = false; let mut last_kind = MimeAppMatch::Exact; @@ -6343,8 +6374,8 @@ impl Application for App { widget::mouse_area( widget::button::custom( widget::row::with_children([ - icon(app.icon()).size(32).into(), - if app.is_default(mime) && !displayed_default { + icon(app.icon.clone()).size(32).into(), + if app.is_default && !displayed_default { displayed_default = true; widget::text::body(fl!( "default-app", @@ -7182,22 +7213,6 @@ impl Application for App { }, ) }), - #[cfg(feature = "desktop")] - Subscription::run(|| { - stream::channel( - 1, - |mut output: futures::channel::mpsc::Sender| async move { - mime_app::watch(move || { - futures::executor::block_on(async { - _ = output.send(Message::ReloadMimeAppCache).await; - }) - }) - .await; - - std::future::pending().await - }, - ) - }), Subscription::run_with(TypeId::of::(), |_| { stream::channel( 1, diff --git a/src/archive.rs b/src/archive.rs index d51b01b..cff0c1e 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -1,5 +1,5 @@ use crate::mime_icon::mime_for_path; -use crate::operation::{Controller, OpReader, OperationError, OperationErrorType}; +use crate::operation::{Controller, OpReader, OperationError, OperationErrorType, sync_to_disk}; use cosmic::iced::futures; use jiff::Zoned; use jiff::civil::DateTime; @@ -45,7 +45,7 @@ pub fn extract( new_dir: &Path, password: &Option, controller: &Controller, -) -> Result<(Vec, HashSet), OperationError> { +) -> Result<(), OperationError> { let mime = mime_for_path(path, None, false); let password = password.as_deref(); match mime.essence_str() { @@ -55,15 +55,13 @@ pub fn extract( .map(flate2::read::GzDecoder::new) .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) - .map_err(|e| OperationError::from_err(e, controller)) - .map(|_| Default::default()) + .map_err(|e| OperationError::from_err(e, controller))?; } "application/x-tar" => OpReader::new(path, controller.clone()) .map(io::BufReader::new) .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) - .map_err(|e| OperationError::from_err(e, controller)) - .map(|_| Default::default()), + .map_err(|e| OperationError::from_err(e, controller))?, "application/zip" => fs::File::open(path) .map(io::BufReader::new) .map(zip::ZipArchive::new) @@ -77,7 +75,7 @@ pub fn extract( OperationError::from_kind(OperationErrorType::PasswordRequired, controller) } _ => OperationError::from_err(e, controller), - }), + })?, #[cfg(feature = "bzip2")] "application/x-bzip" | "application/x-bzip-compressed-tar" @@ -87,8 +85,7 @@ pub fn extract( .map(bzip2::read::BzDecoder::new) .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) - .map_err(|e| OperationError::from_err(e, controller)) - .map(|_| Default::default()), + .map_err(|e| OperationError::from_err(e, controller))?, #[cfg(feature = "lzma-rust2")] "application/x-xz" | "application/x-xz-compressed-tar" => { OpReader::new(path, controller.clone()) @@ -96,14 +93,14 @@ pub fn extract( .map(|reader| lzma_rust2::XzReader::new(reader, true)) .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) - .map_err(|e| OperationError::from_err(e, controller)) - .map(|_| Default::default()) + .map_err(|e| OperationError::from_err(e, controller))?; } _ => Err(OperationError::from_err( format!("unsupported mime type {mime:?}"), controller, - )), + ))?, } + Ok(()) } // From https://docs.rs/zip/latest/zip/read/struct.ZipArchive.html#method.extract, with cancellation and progress added @@ -112,7 +109,7 @@ fn zip_extract>( directory: P, password: Option<&str>, controller: Controller, -) -> zip::result::ZipResult<(Vec, HashSet)> { +) -> zip::result::ZipResult<()> { use std::ffi::OsString; use std::fs; use zip::result::ZipError; @@ -285,7 +282,10 @@ fn zip_extract>( } } - Ok((written_files, target_dirs)) + // Flush files to disk + futures::executor::block_on(async { sync_to_disk(written_files, target_dirs).await }); + + Ok(()) } fn zip_date_time_to_system_time(date_time: zip::DateTime) -> Option { diff --git a/src/dialog.rs b/src/dialog.rs index c760472..0107fa9 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -40,7 +40,7 @@ use crate::localize::LANGUAGE_SORTER; use crate::mounter::{MOUNTERS, MounterItem, MounterItems, MounterKey, MounterMessage}; use crate::tab::{self, ItemMetadata, Location, SearchLocation, Tab}; use crate::zoom::{zoom_in_view, zoom_out_view, zoom_to_default}; -use crate::{fl, home_dir, menu, mime_icon}; +use crate::{fl, home_dir, menu}; #[derive(Clone, Debug)] pub struct DialogMessage(cosmic::Action); @@ -1458,14 +1458,14 @@ impl Application for App { } Message::Key(modifiers, key, physical_key, text) => { for (key_bind, action) in &self.key_binds { - if key_bind.matches(modifiers, &key, Some(&physical_key)) { + if key_bind.matches(modifiers, &key, None) { return self.update(Message::from(action.message())); } } // Check key binds from accept label if let Some(key_bind) = &self.accept_label.key_bind_opt - && key_bind.matches(modifiers, &key, Some(&physical_key)) + && key_bind.matches(modifiers, &key, None) { return self.update(if self.flags.kind.save() { Message::Save(false) @@ -1926,13 +1926,11 @@ impl Application for App { items.retain(|item| { // Directories are always shown item.metadata.is_dir() - // Check for mime type match (first because it is faster) || mimes.iter().any(|filter_mime| { if filter_mime.subtype() == mime::STAR { filter_mime.type_() == item.mime.type_() } else { *filter_mime == item.mime - || mime_icon::is_mime_subclass_of(&item.mime, filter_mime) } }) // Check for glob match (last because it is slower) diff --git a/src/key_bind.rs b/src/key_bind.rs index d3ddd59..f47d403 100644 --- a/src/key_bind.rs +++ b/src/key_bind.rs @@ -30,16 +30,12 @@ pub fn key_binds(mode: &tab::Mode) -> HashMap { bind!([], Key::Named(Named::F5), Reload); bind!([], Key::Named(Named::Home), SelectFirst); bind!([], Key::Named(Named::End), SelectLast); - bind!([], Key::Named(Named::PageDown), ItemPageDown); - bind!([], Key::Named(Named::PageUp), ItemPageUp); bind!([Shift], Key::Named(Named::ArrowDown), ItemDown); bind!([Shift], Key::Named(Named::ArrowLeft), ItemLeft); bind!([Shift], Key::Named(Named::ArrowRight), ItemRight); bind!([Shift], Key::Named(Named::ArrowUp), ItemUp); bind!([Shift], Key::Named(Named::Home), SelectFirst); bind!([Shift], Key::Named(Named::End), SelectLast); - bind!([Shift], Key::Named(Named::PageDown), ItemPageDown); - bind!([Shift], Key::Named(Named::PageUp), ItemPageUp); bind!([Ctrl, Shift], Key::Character("n".into()), NewFolder); bind!([], Key::Named(Named::Enter), Open); bind!([Ctrl], Key::Character(" ".into()), Preview); diff --git a/src/menu.rs b/src/menu.rs index 0937595..5748956 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -19,9 +19,7 @@ use std::sync::LazyLock; use crate::app::{Action, Message}; use crate::config::{Config, ContextActionPreset}; use crate::fl; -use crate::tab::{ - self, HeadingOptions, ItemMetadata, Location, LocationMenuAction, SearchLocation, Tab, -}; +use crate::tab::{self, HeadingOptions, Location, LocationMenuAction, SearchLocation, Tab}; use crate::trash::{Trash, TrashExt}; static MENU_ID: LazyLock = @@ -110,25 +108,18 @@ pub fn context_menu<'a>( let (sort_name, sort_direction, _) = tab.sort_options(); let sort_item = |label, variant| { - let key = find_key(&Action::ToggleSort(variant)); - let leading: Element<'a, tab::Message> = if sort_name == variant { - let icon_name = if sort_direction { - "view-sort-ascending-symbolic" - } else { - "view-sort-descending-symbolic" - }; - widget::icon::from_name(icon_name).size(14).into() - } else { - space::horizontal().width(Length::Fixed(14.0)).into() - }; - menu_button!( - leading, - space::horizontal().width(Length::Fixed(theme::spacing().space_xxs.into())), - text::body(label), - space::horizontal(), - text::body(key).class(theme::Text::Custom(key_style)) + menu_item( + format!( + "{} {}", + label, + match (sort_name == variant, sort_direction) { + (true, true) => "\u{2B07}", + (true, false) => "\u{2B06}", + _ => "", + } + ), + Action::ToggleSort(variant), ) - .on_press(tab::Message::ContextAction(Action::ToggleSort(variant))) .into() }; @@ -138,7 +129,6 @@ pub fn context_menu<'a>( let mut selected_desktop_entry = None; let mut selected_types: Vec = vec![]; let mut selected_mount_point = 0; - let mut any_trash_item = false; if let Some(items) = tab.items_opt() { for item in items { if item.selected { @@ -159,9 +149,6 @@ pub fn context_menu<'a>( } _ => (), } - if matches!(&item.metadata, ItemMetadata::Trash { .. }) { - any_trash_item = true; - } selected_types.push(item.mime.clone()); } } @@ -283,38 +270,27 @@ pub fn context_menu<'a>( //TODO: Print? children.push(menu_item(fl!("show-details"), Action::Preview).into()); - if any_trash_item { + if matches!(tab.mode, tab::Mode::App) { children.push(divider::horizontal::light().into()); + children.push(menu_item(fl!("add-to-sidebar"), Action::AddToSidebar).into()); + } + children.push(divider::horizontal::light().into()); + if tab.location.is_recents() { children.push( - menu_item(fl!("restore-from-trash"), Action::RestoreFromTrash).into(), + menu_item(fl!("remove-from-recents"), Action::RemoveFromRecents).into(), ); children.push(divider::horizontal::light().into()); - children.push(menu_item(fl!("delete-permanently"), Action::Delete).into()); - } else { - if matches!(tab.mode, tab::Mode::App) { - children.push(divider::horizontal::light().into()); - children - .push(menu_item(fl!("add-to-sidebar"), Action::AddToSidebar).into()); - } - children.push(divider::horizontal::light().into()); - if tab.location.is_recents() { + } + if selected_mount_point == 0 { + if modifiers.shift() && !modifiers.control() { children.push( - menu_item(fl!("remove-from-recents"), Action::RemoveFromRecents).into(), + menu_item(fl!("delete-permanently"), Action::PermanentlyDelete).into(), ); - children.push(divider::horizontal::light().into()); - } - if selected_mount_point == 0 { - if modifiers.shift() && !modifiers.control() { - children.push( - menu_item(fl!("delete-permanently"), Action::PermanentlyDelete) - .into(), - ); - } else { - children.push(menu_item(fl!("move-to-trash"), Action::Delete).into()); - } - } else if selected == 1 { - children.push(menu_item(fl!("eject"), Action::Eject).into()); + } else { + children.push(menu_item(fl!("move-to-trash"), Action::Delete).into()); } + } else if selected == 1 { + children.push(menu_item(fl!("eject"), Action::Eject).into()); } } else { //TODO: need better designs for menu with no selection diff --git a/src/mime_app.rs b/src/mime_app.rs index 8fd8a60..7535556 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -2,67 +2,19 @@ // SPDX-License-Identifier: GPL-3.0-only use bstr::{BString, ByteSlice, ByteVec}; +#[cfg(feature = "desktop")] +use cosmic::desktop; use cosmic::widget; pub use mime_guess::Mime; +use rustc_hash::FxHashMap; #[cfg(feature = "desktop")] -use notify_debouncer_full::notify; -use rustc_hash::{FxHashMap, FxHashSet}; -use std::ffi::OsStr; -use std::os::unix::ffi::OsStrExt; -use std::path::{Path, PathBuf}; -use std::sync::atomic::AtomicBool; -use std::sync::{Arc, RwLock, atomic}; -use std::time::{self, Instant}; -use std::{fs, io, process}; - -#[cfg(feature = "desktop")] -pub async fn watch(mut emitter: impl FnMut() + 'static + Send) { - let watcher_result = notify_debouncer_full::new_debouncer( - time::Duration::from_millis(250), - Some(time::Duration::from_millis(250)), - move |event_res: notify_debouncer_full::DebounceEventResult| { - let Ok(events) = event_res else { - return; - }; - - if events.iter().any(|event| { - event.kind.is_create() || event.kind.is_modify() || event.kind.is_remove() - }) { - emitter(); - } - }, - ); - - if let Ok(mut watcher) = watcher_result { - let system_paths = cosmic_mime_apps::list_paths(); - let local_paths = (|| { - let base_dirs = xdg::BaseDirectories::new(); - let Some(home) = base_dirs.get_config_home() else { - return Err(std::io::Error::other("XDG config home not set")); - }; - - let Ok(desktop) = std::env::var("XDG_CURRENT_DESKTOP") else { - return Err(std::io::Error::other("XDG_CURRENT_DESKTOP unset")); - }; - - let default_mimeapps = home.join("mimeapps.list"); - let desktop_mimeapps = - home.join([&desktop.to_ascii_lowercase(), "-mimeapps.list"].concat()); - - Ok([desktop_mimeapps, default_mimeapps]) - })() - .ok(); - - for path in system_paths - .iter() - .chain(local_paths.as_ref().into_iter().flatten()) - { - _ = watcher.watch(path.as_path(), notify::RecursiveMode::NonRecursive); - } - - std::future::pending().await - } -} +use std::{cmp::Ordering, fs, io, time::Instant}; +use std::{ + ffi::OsStr, + os::unix::ffi::OsStrExt, + path::{Path, PathBuf}, + process, +}; pub fn exec_to_command( exec: &str, @@ -176,23 +128,14 @@ pub fn exec_to_command( Some(commands) } -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum MimeAppMatch { - Exact, - Related, - Other, -} - #[derive(Clone, Debug)] pub struct MimeApp { pub id: String, pub path: Option, pub name: String, pub exec: Option, - icon_name: Box, - icon: std::sync::OnceLock, - is_default: Arc>>>, - no_display: Arc, + pub icon: widget::icon::Handle, + pub is_default: bool, } impl MimeApp { @@ -205,27 +148,6 @@ impl MimeApp { path_opt, ) } - - pub fn is_default(&self, mime: &Mime) -> bool { - self.is_default.read().unwrap().contains(mime.essence_str()) - } - - pub fn no_display(&self) -> bool { - self.no_display.load(atomic::Ordering::Relaxed) - } - - pub fn icon(&self) -> widget::icon::Handle { - self.icon - .get_or_init(|| { - let name = &*self.icon_name; - if name.starts_with('/') { - cosmic::widget::icon::from_path(PathBuf::from(name)) - } else { - cosmic::widget::icon::from_name(name).size(32).handle() - } - }) - .clone() - } } // This allows usage of MimeApp in a dropdown @@ -235,10 +157,38 @@ impl AsRef for MimeApp { } } +#[cfg(feature = "desktop")] +impl From<&desktop::DesktopEntryData> for MimeApp { + fn from(app: &desktop::DesktopEntryData) -> Self { + Self { + id: app.id.clone(), + path: app.path.clone(), + name: app.name.clone(), + exec: app.exec.clone(), + icon: match &app.icon { + desktop::fde::IconSource::Name(name) => { + widget::icon::from_name(name.as_str()).size(32).handle() + } + desktop::fde::IconSource::Path(path) => widget::icon::from_path(path.clone()), + }, + is_default: false, + } + } +} + +#[cfg(feature = "desktop")] +fn filename_eq(path_opt: &Option, filename: &str) -> bool { + path_opt + .as_ref() + .and_then(|path| path.file_name()) + .is_some_and(|x| x == filename) +} + pub struct MimeAppCache { - apps: Vec>, - cache: FxHashMap>>, - terminals: Vec>, + apps: Vec, + cache: FxHashMap>, + icons: FxHashMap>, + terminals: Vec, } impl MimeAppCache { @@ -246,273 +196,154 @@ impl MimeAppCache { let mut mime_app_cache = Self { apps: Vec::new(), cache: FxHashMap::default(), + icons: FxHashMap::default(), terminals: Vec::new(), }; mime_app_cache.reload(); mime_app_cache } - pub fn get_apps_for_mime( - &self, - mime_type: &Mime, - include_other: bool, - ) -> Vec<(&Arc, MimeAppMatch)> { - let mut results = Vec::new(); - let mut dedupe = FxHashSet::default(); - - // start with exact matches - results.extend( - self.get(mime_type) - .iter() - .filter(|&mime_app| dedupe.insert(&mime_app.id)) - .map(|mime_app| (mime_app, MimeAppMatch::Exact)), - ); - - let include_mime = match mime_type.type_().as_str() { - "audio" => Some("video/mp4".parse::().expect("video/mp4 mime")), - "text" => Some(mime_guess::mime::TEXT_PLAIN), - _ => None, - }; - - if let Some(mime) = include_mime { - results.extend( - self.get(&mime) - .iter() - .filter(|&mime_app| dedupe.insert(&mime_app.id)) - .map(|mime_app| (mime_app, MimeAppMatch::Exact)), - ); - } - - // grab matches based off of subclass / parent mime type - if let Some(parent_types) = crate::mime_icon::parent_mime_types(mime_type) { - for parent_type in parent_types { - results.extend( - self.get(&parent_type) - .iter() - .filter(|&mime_app| dedupe.insert(&mime_app.id)) - .map(|mime_app| (mime_app, MimeAppMatch::Related)), - ); - } - } - - if include_other { - results.extend({ - let mut apps = self - .apps() - .iter() - .filter(|mime_app| !mime_app.no_display()) - .filter(|&mime_app| dedupe.insert(&mime_app.id)) - .map(|mime_app| (mime_app, MimeAppMatch::Other)) - .collect::>(); - apps.sort_by(|(a, _), (b, _)| { - crate::localize::LANGUAGE_SORTER.compare(&a.name, &b.name) - }); - apps - }); - } - - results - } - #[cfg(not(feature = "desktop"))] pub fn reload(&mut self) {} - /// Reload mime types and their known app associations and defaults. + // Only available when using desktop feature of libcosmic, which only works on Unix-likes #[cfg(feature = "desktop")] pub fn reload(&mut self) { use crate::localize::LANGUAGE_SORTER; - use crate::mime_icon; - use cosmic::desktop::fde; - use std::borrow::Cow; let start = Instant::now(); self.apps.clear(); self.cache.clear(); + self.icons.clear(); self.terminals.clear(); + //TODO: get proper locale? + let locale = &[]; + + // Load desktop applications by supported mime types + //TODO: hashmap for all apps by id? + let all_apps: Box<[_]> = desktop::load_applications(locale, false, None).collect(); + for app in &all_apps { + //TODO: just collect apps that can be executed with a file argument? + if !app.mime_types.is_empty() { + self.apps.push(MimeApp::from(app)); + } + for mime in &app.mime_types { + let apps = self + .cache + .entry(mime.clone()) + .or_insert_with(|| Vec::with_capacity(1)); + if !apps.iter().any(|x| x.id == app.id) { + apps.push(MimeApp::from(app)); + } + } + for category in &app.categories { + if category == "TerminalEmulator" { + self.terminals.push(MimeApp::from(app)); + break; + } + } + } + let mut list = cosmic_mime_apps::List::default(); + let paths = cosmic_mime_apps::list_paths(); list.load_from_paths(&paths); - let locales = fde::get_languages_from_env(); - let desktop_entries = fde::Iter::new(fde::default_paths()).entries(Some(&locales)); - let mime_icon_cache = mime_icon::MIME_ICON_CACHE.lock().unwrap(); - let shared_mime_info = &mime_icon_cache.shared_mime_info; - let mut aliased_mimes = FxHashMap::default(); - for desktop_entry in desktop_entries { - let name = desktop_entry - .name(&locales) - .unwrap_or_else(|| Cow::Borrowed(desktop_entry.id())); - - let app = Arc::new(MimeApp { - id: desktop_entry.appid.clone(), - path: Some(desktop_entry.path.clone()), - name: name.into(), - exec: desktop_entry.exec().map(String::from), - icon_name: desktop_entry.icon().unwrap_or_default().into(), - icon: std::sync::OnceLock::new(), - is_default: Arc::new(RwLock::default()), - no_display: Arc::new(AtomicBool::new(false)), - }); - - tracing::info!(target: "mime-apps", id = app.id, "detected desktop entry"); - - self.apps.push(app.clone()); - - if desktop_entry - .categories() - .into_iter() - .flatten() - .any(|c| c == "TerminalEmulator") - { - self.terminals.push(app.clone()); - } - - // Cache associations defined by the desktop entry. - let mime_types = desktop_entry.mime_type().unwrap_or_else(Vec::new); - let associated_mime_types = mime_types.iter().filter_map(|m| { - m.parse::().ok().map(|mime| { - if let Some(unaliased) = shared_mime_info.unalias_mime_type(&mime) { - aliased_mimes.insert(unaliased.clone(), mime); - return unaliased; - } - - mime - }) - }); - - for mime in associated_mime_types { - let apps = self.cache.entry(mime.clone()).or_default(); - if apps.iter().all(|cached_app| cached_app.id != app.id) { - apps.push(app.clone()); - } - } - } - - // Cache added associations from mimeapps lists. - for (mut added_mime, added_apps) in &list.added_associations { - let _unaliased; - if let Some(unaliased) = shared_mime_info.unalias_mime_type(added_mime) { - aliased_mimes.insert(unaliased.clone(), added_mime.clone()); - _unaliased = unaliased; - added_mime = &_unaliased; - } - - for added_app in added_apps { - if let Some(app) = self - .apps - .iter() - .find(|cached| cached.id.as_str() == added_app.as_ref()) - { - let apps = self.cache.entry(added_mime.clone()).or_default(); - if apps.iter().all(|cached_app| cached_app.id != app.id) { - apps.push(app.clone()); + for (mime, filenames) in list + .added_associations + .iter() + .chain(list.default_apps.iter()) + { + for filename in filenames { + log::trace!("add {mime}={filename}"); + let apps = self + .cache + .entry(mime.clone()) + .or_insert_with(|| Vec::with_capacity(1)); + if !apps.iter().any(|x| filename_eq(&x.path, filename)) { + if let Some(app) = all_apps.iter().find(|&x| filename_eq(&x.path, filename)) { + apps.push(MimeApp::from(app)); + } else { + log::info!( + "failed to add association for {mime:?}: application {filename:?} not found" + ); } } } } - // Remove associations - for (mut removed_mime, removed_apps) in &list.removed_associations { - let _unaliased; - if let Some(unaliased) = shared_mime_info.unalias_mime_type(removed_mime) { - aliased_mimes.insert(unaliased.clone(), removed_mime.clone()); - _unaliased = unaliased; - removed_mime = &_unaliased; - } - - for removed_app in removed_apps { - if let Some(app) = self - .apps - .iter() - .find(|cached| cached.id.as_str() == removed_app.as_ref()) - && let Some(apps) = self.cache.get_mut(removed_mime) - { - apps.retain(|cached_app| cached_app.id != app.id); + for (mime, filenames) in list.removed_associations.iter() { + for filename in filenames { + log::trace!("remove {mime}={filename}"); + if let Some(apps) = self.cache.get_mut(mime) { + apps.retain(|x| !filename_eq(&x.path, filename)); } } } - // Fetch defaults and sort apps by their default precedence. - for (mime, mut apps) in std::mem::take(&mut self.cache).into_iter() { - let defaults = list.default_app_for(&mime); - let aliased_defaults = aliased_mimes - .get(&mime) - .and_then(|mime| list.default_app_for(mime)); - - let cache = self - .cache - .entry(mime.clone()) - .or_insert_with(|| Vec::with_capacity(apps.len())); - - // Sort cached apps for this mime by default precedence. - for default in defaults - .into_iter() - .flatten() - .chain(aliased_defaults.into_iter().flatten()) - { - let default = default.strip_suffix(".desktop").unwrap_or(default.as_ref()); - let mut found_any = false; - apps.retain(|app| { - let found = app.id.as_str() == default; + for (mime, filenames) in list.default_apps.iter() { + for filename in filenames { + log::trace!("default {mime}={filename}"); + if let Some(apps) = self.cache.get_mut(mime) { + let mut found = false; + for app in apps.iter_mut() { + if filename_eq(&app.path, filename) { + app.is_default = true; + found = true; + } else { + app.is_default = false; + } + } if found { - app.is_default - .write() - .unwrap() - .insert(mime.essence_str().into()); - cache.push(app.clone()); - found_any = true; + break; } - - !found - }); - - if !found_any && let Some(app) = self.apps.iter().find(|app| app.id == default) { - app.is_default - .write() - .unwrap() - .insert(mime.essence_str().into()); - cache.push(app.clone()); + log::debug!( + "failed to set default for {mime:?}: application {filename:?} not found" + ); } } - - // Sort remaining apps by name - apps.sort_by(|a, b| LANGUAGE_SORTER.compare(&a.name, &b.name)); - cache.extend_from_slice(&apps); - - tracing::debug!(target: "mime-apps", mime = mime.essence_str(), apps = ?(cache.iter().map(|app| &*app.id).collect::>()), "mime defaults found") } - let associated: rustc_hash::FxHashSet<&str> = self - .cache - .values() - .flatten() - .map(|app| app.id.as_str()) - .collect(); - for app in &self.apps { - app.no_display.store( - !associated.contains(app.id.as_str()), - atomic::Ordering::Relaxed, - ); + // Sort apps by name + self.apps + .sort_by(|a, b| match (a.is_default, b.is_default) { + (true, false) => Ordering::Less, + (false, true) => Ordering::Greater, + _ => LANGUAGE_SORTER.compare(&a.name, &b.name), + }); + for apps in self.cache.values_mut() { + apps.sort_by(|a, b| match (a.is_default, b.is_default) { + (true, false) => Ordering::Less, + (false, true) => Ordering::Greater, + _ => LANGUAGE_SORTER.compare(&a.name, &b.name), + }); } + // Copy icons to special cache + //TODO: adjust dropdown API so this is no longer needed + self.icons.extend(self.cache.iter().map(|(mime, apps)| { + ( + mime.clone(), + apps.iter().map(|app| app.icon.clone()).collect(), + ) + })); + let elapsed = start.elapsed(); - tracing::info!(target: "mime-apps", "loaded mime app cache in {elapsed:?}"); + log::info!("loaded mime app cache in {elapsed:?}"); } - pub fn apps(&self) -> &[Arc] { + pub fn apps(&self) -> &[MimeApp] { &self.apps } - pub fn get(&self, key: &Mime) -> &[Arc] { + pub fn get(&self, key: &Mime) -> &[MimeApp] { self.cache.get(key).map_or(&[], Vec::as_slice) } - pub fn icons(&self, key: &Mime) -> Vec { - self.cache - .get(key) - .map_or_else(Vec::new, |apps| apps.iter().map(|app| app.icon()).collect()) + pub fn icons(&self, key: &Mime) -> &[widget::icon::Handle] { + self.icons.get(key).map_or(&[], Box::as_ref) } fn get_default_terminal(&self) -> Option { @@ -530,13 +361,11 @@ impl MimeAppCache { .map(|string| string.trim().replace(".desktop", "")) } - pub fn terminal(&self) -> Option<&Arc> { + pub fn terminal(&self) -> Option<&MimeApp> { //TODO: consider rules in https://github.com/Vladimir-csp/xdg-terminal-exec // The current approach works but might not adhere to the spec (yet) // Look for and return preferred terminals - //TODO: fallback order beyond cosmic-term? - // Yoda: cosmic-yoterm (our fork) wins over upstream cosmic-term if both // are installed — useful when xdg-mime default is not set. let mut preference_order = vec![ diff --git a/src/mime_icon.rs b/src/mime_icon.rs index 26d899d..64f007f 100644 --- a/src/mime_icon.rs +++ b/src/mime_icon.rs @@ -15,21 +15,28 @@ struct MimeIconKey { size: u16, } -#[derive(Default)] -pub struct MimeIconCache { +struct MimeIconCache { cache: FxHashMap>, #[cfg(unix)] - pub shared_mime_info: xdg_mime::SharedMimeInfo, + shared_mime_info: xdg_mime::SharedMimeInfo, } impl MimeIconCache { + pub fn new() -> Self { + Self { + cache: FxHashMap::default(), + #[cfg(unix)] + shared_mime_info: xdg_mime::SharedMimeInfo::new(), + } + } + #[cfg(not(unix))] pub fn get(&mut self, _key: MimeIconKey) -> Option { None } #[cfg(unix)] - fn get(&mut self, key: MimeIconKey) -> Option { + pub fn get(&mut self, key: MimeIconKey) -> Option { self.cache .entry(key) .or_insert_with_key(|key| { @@ -49,9 +56,8 @@ impl MimeIconCache { .clone() } } - -pub static MIME_ICON_CACHE: LazyLock> = - LazyLock::new(|| Mutex::new(MimeIconCache::default())); +static MIME_ICON_CACHE: LazyLock> = + LazyLock::new(|| Mutex::new(MimeIconCache::new())); #[cfg(not(unix))] pub fn mime_for_path( @@ -72,7 +78,6 @@ pub fn mime_for_path( let mime_icon_cache = MIME_ICON_CACHE.lock().unwrap(); // Try the shared mime info cache first let mut gb = mime_icon_cache.shared_mime_info.guess_mime_type(); - gb.zero_size(false); if remote { if let Some(file_name) = path.file_name().and_then(std::ffi::OsStr::to_str) { gb.file_name(file_name); @@ -124,11 +129,3 @@ pub fn parent_mime_types(mime: &Mime) -> Option> { let mime_icon_cache = MIME_ICON_CACHE.lock().unwrap(); mime_icon_cache.shared_mime_info.get_parents_aliased(mime) } - -pub fn is_mime_subclass_of(mime_type: &Mime, base: &Mime) -> bool { - let mime_icon_cache = MIME_ICON_CACHE.lock().unwrap(); - - mime_icon_cache - .shared_mime_info - .mime_type_subclass(mime_type, base) -} diff --git a/src/mounter/gvfs.rs b/src/mounter/gvfs.rs index e2c6ba1..7c28668 100644 --- a/src/mounter/gvfs.rs +++ b/src/mounter/gvfs.rs @@ -14,7 +14,7 @@ use tokio::sync::mpsc; use super::{Mounter, MounterAuth, MounterItem, MounterItems, MounterMessage}; use crate::config::IconSizes; use crate::err_str; -use crate::tab::{self, ChecksumState, DirSize, ItemMetadata, ItemThumbnail, Location}; +use crate::tab::{self, DirSize, ItemMetadata, ItemThumbnail, Location}; const TARGET_URI_ATTRIBUTE: &str = "standard::target-uri"; @@ -216,7 +216,6 @@ fn network_scan(uri: &str, sizes: IconSizes) -> Result, String> { //TODO: scan directory size on gvfs mounts? dir_size: DirSize::NotDirectory, cut: false, - checksums: ChecksumState::default(), }); } Ok(items) diff --git a/src/operation/mod.rs b/src/operation/mod.rs index 62dbba6..c490655 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -967,13 +967,11 @@ impl Operation { password, } => { let controller_clone = controller.clone(); - compio::runtime::spawn(async move { - let extracted = compio::runtime::spawn_blocking(move || { + compio::runtime::spawn_blocking( + move || -> Result { let controller = controller_clone; let total_paths = paths.len(); let mut op_sel = OperationSelection::default(); - let mut written_files = Vec::new(); - let mut target_dirs = std::collections::HashSet::new(); for (i, path) in paths.iter().enumerate() { futures::executor::block_on(async { controller @@ -997,32 +995,16 @@ impl Operation { op_sel.ignored.push(path.clone()); op_sel.selected.push(new_dir.clone()); - let (files, dirs) = crate::archive::extract( - path, - &new_dir, - &password, - &controller, - )?; - written_files.extend(files); - target_dirs.extend(dirs); + crate::archive::extract(path, &new_dir, &password, &controller)?; } } - Ok::<_, OperationError>((op_sel, written_files, target_dirs)) - }) - .await - .map_err(wrap_compio_spawn_error)??; - - let (op_sel, written_files, target_dirs) = extracted; - if !written_files.is_empty() || !target_dirs.is_empty() { - sync_to_disk(written_files, target_dirs).await; - } - - Ok::<_, OperationError>(op_sel) - }) - .await - .map_err(wrap_compio_spawn_error)? + Ok(op_sel) + }, + ) } + .await + .map_err(wrap_compio_spawn_error)?, Self::Move { paths, to, @@ -1156,26 +1138,10 @@ impl Operation { paths.push(item.original_path()); - // Items with .trashinfo id use standard restore; sub-items use manual move - if item - .id - .to_str() - .map_or(false, |s| s.ends_with(".trashinfo")) - { - compio::runtime::spawn_blocking(|| trash::os_limited::restore_all([item])) - .await - .map_err(wrap_compio_spawn_error)? - .map_err(|e| OperationError::from_err(e, &controller))?; - } else { - let from = PathBuf::from(&item.id); - let to = item.original_path(); - if let Some(parent) = to.parent() { - std::fs::create_dir_all(parent) - .map_err(|e| OperationError::from_err(e, &controller))?; - } - std::fs::rename(&from, &to) - .map_err(|e| OperationError::from_err(e, &controller))?; - } + compio::runtime::spawn_blocking(|| trash::os_limited::restore_all([item])) + .await + .map_err(wrap_compio_spawn_error)? + .map_err(|e| OperationError::from_err(e, &controller))?; } Ok(OperationSelection { ignored: Vec::new(), diff --git a/src/tab.rs b/src/tab.rs index dc3d925..2db66a6 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -29,7 +29,6 @@ use jiff_icu::ConvertFrom; use mime_guess::{Mime, mime}; use rustc_hash::FxHashMap; use serde::{Deserialize, Serialize}; -use sha2::{Digest, Sha256}; use std::borrow::Cow; use std::cell::Cell; use std::cmp::{Ordering, Reverse}; @@ -746,7 +745,6 @@ pub fn item_from_gvfs_info(path: PathBuf, file_info: gio::FileInfo, sizes: IconS overlaps_drag_rect: false, dir_size, cut: false, - checksums: ChecksumState::default(), } } @@ -876,7 +874,6 @@ pub fn item_from_entry( overlaps_drag_rect: false, dir_size, cut: false, - checksums: ChecksumState::default(), } } @@ -889,8 +886,6 @@ pub fn item_from_trash_entry( let name = entry.name.to_string_lossy().into_owned(); let display_name = Item::display_name(&name); - let location = crate::trash::trash_item_path(&entry).map(Location::Path); - let (mime, icon_handle_grid, icon_handle_list, icon_handle_list_condensed) = match metadata.size { trash::TrashItemSize::Entries(_) => ( @@ -918,7 +913,7 @@ pub fn item_from_trash_entry( is_mount_point: false, metadata: ItemMetadata::Trash { metadata, entry }, hidden: false, - location_opt: location, + location_opt: None, image_dimensions: (mime.type_() == mime::IMAGE) .then(|| image::image_dimensions(&original_path).ok()) .flatten(), @@ -935,35 +930,9 @@ pub fn item_from_trash_entry( overlaps_drag_rect: false, dir_size: DirSize::NotDirectory, cut: false, - checksums: ChecksumState::default(), } } -fn item_from_trash_child( - path: PathBuf, - name: String, - metadata: fs::Metadata, - sizes: IconSizes, -) -> Option { - let original_path = crate::trash::original_path_for_trash_child(&path)?; - let entry = trash::TrashItem { - id: path.as_os_str().to_os_string(), - name: std::ffi::OsString::from(&name), - original_parent: original_path.parent()?.to_path_buf(), - time_deleted: 0, - }; - let size = if metadata.is_dir() { - trash::TrashItemSize::Entries(0) - } else { - trash::TrashItemSize::Bytes(metadata.len()) - }; - Some(item_from_trash_entry( - entry, - trash::TrashItemMetadata { size }, - sizes, - )) -} - fn get_filename_from_path(path: &Path) -> Result { Ok(match path.file_name() { Some(name_os) => name_os @@ -1082,12 +1051,7 @@ pub fn scan_path(tab_path: &PathBuf, sizes: IconSizes) -> Vec { }) .ok()?; - let trash = crate::trash::is_trash_path(tab_path); - if trash { - item_from_trash_child(path, name, metadata, sizes) - } else { - Some(item_from_entry(path, name, metadata, sizes)) - } + Some(item_from_entry(path, name, metadata, sizes)) }) .collect(); } @@ -1392,7 +1356,6 @@ pub fn scan_desktop( overlaps_drag_rect: false, dir_size: DirSize::NotDirectory, cut: false, - checksums: ChecksumState::default(), }); } @@ -1776,8 +1739,6 @@ pub enum Message { GoPrevious, ItemDown, ItemLeft, - ItemPageDown, - ItemPageUp, ItemRight, ItemUp, Location(Location), @@ -1814,9 +1775,6 @@ pub enum Message { HighlightDeactivate(usize), HighlightActivate(usize), DirectorySize(PathBuf, DirSize), - Checksums(PathBuf, ChecksumState), - CalculateChecksums(PathBuf), - CopyChecksum(String), ImageDecoded(PathBuf, u32, u32, Vec, Option<(u32, u32)>, u64), // path, width, height, pixels, display_size, generation } @@ -1844,23 +1802,6 @@ pub enum DirSize { Error(String), } -/// Checksums computed for a file. Only SHA256 is currently exposed; see -/// [`calculate_checksums`] for how to add more. -#[derive(Clone, Debug, Default)] -pub struct FileChecksums { - pub sha256: String, -} - -/// State of checksum computation for a file. -#[derive(Clone, Debug, Default)] -pub enum ChecksumState { - #[default] - NotCalculated, - Calculating, - Calculated(FileChecksums), - Error(String), -} - #[derive(Clone, Debug)] pub enum ItemMetadata { Path { @@ -2312,7 +2253,6 @@ pub struct Item { pub cut: bool, pub overlaps_drag_rect: bool, pub dir_size: DirSize, - pub checksums: ChecksumState, } impl Item { @@ -2443,24 +2383,20 @@ impl Item { ))); let mut settings = Vec::new(); if let Some(mime_app_cache) = mime_app_cache_opt { - let mime_apps = mime_app_cache.get_apps_for_mime(&self.mime, false); + let mime_apps = mime_app_cache.get(&self.mime); if !mime_apps.is_empty() { - let (names, icons) = mime_apps - .iter() - .map(|(app, _)| (Cow::Owned(app.name.clone()), app.icon())) - .collect::<(Vec<_>, Vec<_>)>(); settings.push( widget::settings::item::builder(fl!("open-with")).control( Element::from( widget::dropdown( - names, - mime_apps.iter().position(|(x, _)| x.is_default(&self.mime)), + mime_apps, + mime_apps.iter().position(|x| x.is_default), move |index| index, ) - .icons(Cow::Owned(icons)), + .icons(Cow::Borrowed(mime_app_cache.icons(&self.mime))), ) - .map(move |index| { - let mime_app = &mime_apps[index].0; + .map(|index| { + let mime_app = &mime_apps[index]; Message::SetOpenWith(self.mime.clone(), mime_app.id.clone()) }), ), @@ -2589,55 +2525,6 @@ impl Item { } column = column.push(details); - if let Some(metadata) = self.file_metadata() - && !metadata.is_dir() - && let Some(path) = self.path_opt() - { - let control: Element<'_, Message> = match &self.checksums { - ChecksumState::NotCalculated => widget::button::standard(fl!("calculate")) - .on_press(Message::CalculateChecksums(path.clone())) - .into(), - ChecksumState::Calculating => widget::row::with_capacity(2) - .align_y(Alignment::Center) - .spacing(space_xxxs) - .push(widget::indeterminate_circular().size(16.0)) - .push(widget::text::body(fl!("calculating"))) - .into(), - ChecksumState::Calculated(checksums) => { - let value = checksums.sha256.clone(); - // Middle-ellipsize the digest to fit, full value on hover. - let value_text = widget::tooltip( - widget::text::body(value.clone()) - .font(cosmic::font::mono()) - .width(Length::Fill) - .wrapping(text::Wrapping::None) - .ellipsize(text::Ellipsize::Middle(text::EllipsizeHeightLimit::Lines( - 1, - ))), - widget::text::body(value.clone()), - widget::tooltip::Position::Bottom, - ); - let copy_button = widget::button::icon( - widget::icon::from_name("edit-copy-symbolic").size(16), - ) - .on_press(Message::CopyChecksum(value.clone())) - .tooltip(fl!("copy")); - widget::row::with_capacity(2) - .align_y(Alignment::Center) - .spacing(space_xxxs) - .push(value_text) - .push(copy_button) - .into() - } - ChecksumState::Error(err) => { - widget::text::body(format!("{}: {}", fl!("error"), err)).into() - } - }; - settings.push( - widget::settings::item::builder(fl!("checksum", kind = "SHA256")).control(control), - ); - } - if let Some(path) = self.path_opt() && self.selected { @@ -2835,32 +2722,6 @@ async fn calculate_dir_size(path: &Path, controller: Controller) -> Result Result { - let path = path.to_path_buf(); - tokio::task::spawn_blocking(move || { - let mut file = File::open(&path).map_err(|e| e.to_string())?; - let mut sha256_hasher = Sha256::new(); - - let mut buffer = [0u8; 8192]; - loop { - let bytes_read = file.read(&mut buffer).map_err(|e| e.to_string())?; - if bytes_read == 0 { - break; - } - sha256_hasher.update(&buffer[..bytes_read]); - } - - Ok(FileChecksums { - sha256: format!("{:x}", sha256_hasher.finalize()), - }) - }) - .await - .map_err(|e| e.to_string())? -} - fn folder_name>(path: P) -> (String, bool) { let path = path.as_ref(); let mut found_home = false; @@ -3280,14 +3141,6 @@ impl Tab { item.pos_opt.get() } - fn dehighlight_all(&mut self) { - if let Some(items) = self.items_opt.as_mut() { - for item in items.iter_mut() { - item.highlighted = false; - } - } - } - pub(crate) fn select_focus_scroll(&mut self) -> Option { let items = self.items_opt.as_ref()?; let item = items.get(self.select_focus?)?; @@ -3323,20 +3176,6 @@ impl Tab { } } - fn rows_per_page(&self) -> usize { - let viewport_height = self.item_view_size_opt.get().map_or(0.0, |s| s.height); - let row_height = self - .select_focus - .and_then(|i| self.items_opt.as_ref()?.get(i)) - .and_then(|item| item.rect_opt.get()) - .map_or(0.0, |r| r.height); - if row_height > 0.0 && viewport_height > 0.0 { - (viewport_height / row_height).floor() as usize - } else { - 1 - } - } - fn select_range_start_pos_opt(&self) -> Option<(usize, usize)> { let items = self.items_opt.as_ref()?; let item = items.get(self.select_range.map(|r| r.0)?)?; @@ -3992,7 +3831,6 @@ impl Tab { } } Message::ItemDown => { - self.dehighlight_all(); if let Some(edit_location) = &mut self.edit_location { edit_location.select(true); } else if self.gallery { @@ -4034,95 +3872,7 @@ impl Tab { } } } - Message::ItemPageDown => { - self.dehighlight_all(); - if let Some((row, col)) = self.select_focus_pos_opt().or(self.select_last_pos_opt()) - { - if self.select_focus.is_none() { - self.select_position(row, col, mod_shift); - } - - let rows_per_page = self.rows_per_page().max(1); - let target_row = row.saturating_add(rows_per_page); - - if !self.select_position(target_row, col, mod_shift) { - // Fall back to the last item at or before target_row - let best = self.items_opt.as_ref().and_then(|items| { - items - .iter() - .filter_map(|item| item.pos_opt.get()) - .filter(|(r, _)| *r <= target_row) - .max() - }); - if let Some((best_row, best_col)) = best { - self.select_position(best_row, best_col, mod_shift); - } - } - } else { - self.select_position(0, 0, mod_shift); - } - if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced( - scrollable::scroll_to( - self.scrollable_id.clone(), - AbsoluteOffset { - x: Some(offset.x), - y: Some(offset.y), - }, - ) - .into(), - )); - } - if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id).into())); - } - } - Message::ItemPageUp => { - self.dehighlight_all(); - if let Some((row, col)) = - self.select_focus_pos_opt().or(self.select_first_pos_opt()) - { - if self.select_focus.is_none() { - self.select_position(row, col, mod_shift); - } - - let rows_per_page = self.rows_per_page().max(1); - let target_row = row.saturating_sub(rows_per_page); - - if !self.select_position(target_row, col, mod_shift) { - // Fall back to the first item at or after target_row - let best = self.items_opt.as_ref().and_then(|items| { - items - .iter() - .filter_map(|item| item.pos_opt.get()) - .filter(|(r, _)| *r >= target_row) - .min() - }); - if let Some((best_row, best_col)) = best { - self.select_position(best_row, best_col, mod_shift); - } - } - } else { - self.select_position(0, 0, mod_shift); - } - if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced( - scrollable::scroll_to( - self.scrollable_id.clone(), - AbsoluteOffset { - x: Some(offset.x), - y: Some(offset.y), - }, - ) - .into(), - )); - } - if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id).into())); - } - } Message::ItemLeft => { - self.dehighlight_all(); if self.gallery { commands.append(&mut self.update(Message::GalleryPrevious, modifiers)); } else { @@ -4181,7 +3931,6 @@ impl Tab { } } Message::ItemRight => { - self.dehighlight_all(); if self.gallery { commands.append(&mut self.update(Message::GalleryNext, modifiers)); } else { @@ -4223,7 +3972,6 @@ impl Tab { } } Message::ItemUp => { - self.dehighlight_all(); if let Some(edit_location) = &mut self.edit_location { edit_location.select(false); } else if self.gallery { @@ -4800,52 +4548,6 @@ impl Tab { } } } - Message::Checksums(path, checksum_state) => { - let location = Location::Path(path); - if let Some(ref mut item) = self.parent_item_opt - && item.location_opt.as_ref() == Some(&location) - { - item.checksums = checksum_state.clone(); - } - if let Some(ref mut items) = self.items_opt { - for item in items.iter_mut() { - if item.location_opt.as_ref() == Some(&location) { - item.checksums = checksum_state; - break; - } - } - } - } - Message::CalculateChecksums(path) => { - let location = Location::Path(path.clone()); - if let Some(ref mut item) = self.parent_item_opt - && item.location_opt.as_ref() == Some(&location) - { - item.checksums = ChecksumState::Calculating; - } - if let Some(ref mut items) = self.items_opt { - for item in items.iter_mut() { - if item.location_opt.as_ref() == Some(&location) { - item.checksums = ChecksumState::Calculating; - break; - } - } - } - commands.push(Command::Iced( - cosmic::Task::future(async move { - match calculate_checksums(&path).await { - Ok(checksums) => { - Message::Checksums(path, ChecksumState::Calculated(checksums)) - } - Err(err) => Message::Checksums(path, ChecksumState::Error(err)), - } - }) - .into(), - )); - } - Message::CopyChecksum(value) => { - commands.push(Command::Iced(cosmic::iced::clipboard::write(value).into())); - } } // Scroll to top if needed @@ -6761,25 +6463,21 @@ impl Tab { .and_then(|(mime, _)| mime.parse::().ok()) && let Some(mime_app_cache) = mime_app_cache_opt { - let mime_apps = mime_app_cache.get_apps_for_mime(&mime, false); + let mime_apps = mime_app_cache.get(&mime); if !mime_apps.is_empty() { let mime_closure = mime.clone(); - let (names, icons) = mime_apps - .iter() - .map(|(app, _)| (Cow::Owned(app.name.clone()), app.icon())) - .collect::<(Vec<_>, Vec<_>)>(); settings.push( widget::settings::item::builder(fl!("open-with")).control( Element::from( widget::dropdown( - names, - mime_apps.iter().position(|(x, _)| x.is_default(&mime)), + mime_apps, + mime_apps.iter().position(|x| x.is_default), move |index| (index, mime_closure.clone()), ) - .icons(Cow::Owned(icons)), + .icons(Cow::Borrowed(mime_app_cache.icons(&mime))), ) - .map(move |(index, mime)| { - let mime_app = &mime_apps[index].0; + .map(|(index, mime)| { + let mime_app = &mime_apps[index]; Message::SetOpenWith(mime, mime_app.id.clone()) }), ), diff --git a/src/trash.rs b/src/trash.rs index c0b3548..618e77c 100644 --- a/src/trash.rs +++ b/src/trash.rs @@ -1,30 +1,11 @@ use cosmic::widget; use regex::Regex; use std::collections::HashSet; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use crate::config::IconSizes; use crate::tab::{Item, SearchItem}; -fn percent_decode(s: &str) -> Option { - let (mut r, mut b) = (String::with_capacity(s.len()), s.bytes()); - while let Some(c) = b.next() { - if c == b'%' { - let (hi, lo) = (b.next()?, b.next()?); - let h = |x: u8| match x { - b'0'..=b'9' => Some(x - b'0'), - b'a'..=b'f' => Some(x - b'a' + 10), - b'A'..=b'F' => Some(x - b'A' + 10), - _ => None, - }; - r.push((h(hi)? << 4 | h(lo)?) as char); - } else { - r.push(c as char); - } - } - Some(r) -} - pub trait TrashExt { fn is_empty() -> bool { true @@ -68,46 +49,6 @@ pub trait TrashExt { } } -/// Derive the actual filesystem path of a trashed item from its .trashinfo path -/// (or return the id directly if it's already a filesystem path). -pub fn trash_item_path(item: &trash::TrashItem) -> Option { - let id_path = Path::new(&item.id); - if id_path.extension().map_or(false, |e| e == "trashinfo") { - let trash_root = id_path.parent()?.parent()?; - let file_name = id_path.file_stem()?; - Some(trash_root.join("files").join(file_name)) - } else { - Some(PathBuf::from(&item.id)) - } -} - -/// For a path inside a trash `files/` directory, reconstruct the original path -/// by reading the parent `.trashinfo` file. -/// -/// Given `~/.local/share/Trash/files/folder/sub/file.txt`: -/// - The top-level trashed item is `folder` -/// - Read `~/.local/share/Trash/info/folder.trashinfo` to get the original path -/// - Compute: `/sub/file.txt` -pub fn original_path_for_trash_child(p: &Path) -> Option { - let files = p.ancestors().find(|a| a.ends_with("files"))?; - let root = files.parent()?; - let top = p.strip_prefix(files).ok()?.components().next()?; - let info = - std::fs::read_to_string(root.join("info").join(top).with_extension("trashinfo")).ok()?; - let orig = percent_decode(info.lines().find_map(|l| l.strip_prefix("Path="))?.trim())?; - let rel = p.strip_prefix(files.join(top)).ok()?; - let mut result = PathBuf::from(&orig); - if !rel.as_os_str().is_empty() { - result.push(rel); - } - Some(result) -} - -/// Check whether a path is inside any trash `files/` directory. -pub fn is_trash_path(path: &Path) -> bool { - path.ancestors().any(|a| a.ends_with("files")) -} - pub struct Trash; // This config statement is from trash::os_limited