Merge branch 'refs/heads/master' into recent_section

# Conflicts:
#	Cargo.lock
#	src/tab.rs
This commit is contained in:
Francesco-gaglione 2024-08-27 08:45:47 +02:00
commit a27e67b957
6 changed files with 306 additions and 170 deletions

256
Cargo.lock generated
View file

@ -104,6 +104,12 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "adler2"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]] [[package]]
name = "aes" name = "aes"
version = "0.8.4" version = "0.8.4"
@ -396,7 +402,7 @@ checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7"
dependencies = [ dependencies = [
"async-task", "async-task",
"concurrent-queue", "concurrent-queue",
"fastrand 2.1.0", "fastrand 2.1.1",
"futures-lite 2.3.0", "futures-lite 2.3.0",
"slab", "slab",
] ]
@ -539,7 +545,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -574,7 +580,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -657,7 +663,7 @@ dependencies = [
"cc", "cc",
"cfg-if", "cfg-if",
"libc", "libc",
"miniz_oxide", "miniz_oxide 0.7.4",
"object", "object",
"rustc-demangle", "rustc-demangle",
] ]
@ -818,7 +824,7 @@ checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -908,9 +914,9 @@ dependencies = [
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.1.13" version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [ dependencies = [
"jobserver", "jobserver",
"libc", "libc",
@ -1196,7 +1202,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-config" name = "cosmic-config"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"atomicwrites", "atomicwrites",
"cosmic-config-derive", "cosmic-config-derive",
@ -1215,7 +1221,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-config-derive" name = "cosmic-config-derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"quote", "quote",
"syn 1.0.109", "syn 1.0.109",
@ -1228,7 +1234,7 @@ dependencies = [
"chrono", "chrono",
"dirs 5.0.1", "dirs 5.0.1",
"env_logger", "env_logger",
"fastrand 2.1.0", "fastrand 2.1.1",
"fork", "fork",
"freedesktop_entry_parser", "freedesktop_entry_parser",
"fs_extra", "fs_extra",
@ -1250,7 +1256,6 @@ dependencies = [
"open", "open",
"paste", "paste",
"rayon", "rayon",
"recently-used-xbel",
"regex", "regex",
"rust-embed", "rust-embed",
"serde", "serde",
@ -1262,7 +1267,9 @@ dependencies = [
"test-log", "test-log",
"tokio", "tokio",
"trash", "trash",
"unix_permissions_ext",
"url", "url",
"users",
"vergen", "vergen",
"xdg", "xdg",
"xdg-mime", "xdg-mime",
@ -1308,7 +1315,7 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-theme" name = "cosmic-theme"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"almost", "almost",
"cosmic-config", "cosmic-config",
@ -1464,7 +1471,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim 0.11.1", "strsim 0.11.1",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1475,7 +1482,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [ dependencies = [
"darling_core", "darling_core",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1531,7 +1538,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1543,7 +1550,7 @@ dependencies = [
"darling", "darling",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1566,15 +1573,6 @@ dependencies = [
"dirs-sys 0.3.7", "dirs-sys 0.3.7",
] ]
[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys 0.3.7",
]
[[package]] [[package]]
name = "dirs" name = "dirs"
version = "5.0.1" version = "5.0.1"
@ -1642,7 +1640,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1761,7 +1759,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -1876,7 +1874,7 @@ dependencies = [
"flume", "flume",
"half", "half",
"lebe", "lebe",
"miniz_oxide", "miniz_oxide 0.7.4",
"rayon-core", "rayon-core",
"smallvec", "smallvec",
"zune-inflate", "zune-inflate",
@ -1899,9 +1897,9 @@ dependencies = [
[[package]] [[package]]
name = "fastrand" name = "fastrand"
version = "2.1.0" version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]] [[package]]
name = "fdeflate" name = "fdeflate"
@ -1923,14 +1921,14 @@ dependencies = [
[[package]] [[package]]
name = "filetime" name = "filetime"
version = "0.2.24" version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550" checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
"libredox 0.1.3", "redox_syscall 0.4.1",
"windows-sys 0.59.0", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@ -1944,12 +1942,12 @@ dependencies = [
[[package]] [[package]]
name = "flate2" name = "flate2"
version = "1.0.31" version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253"
dependencies = [ dependencies = [
"crc32fast", "crc32fast",
"miniz_oxide", "miniz_oxide 0.8.0",
] ]
[[package]] [[package]]
@ -2076,7 +2074,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -2233,7 +2231,7 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
dependencies = [ dependencies = [
"fastrand 2.1.0", "fastrand 2.1.1",
"futures-core", "futures-core",
"futures-io", "futures-io",
"parking", "parking",
@ -2248,7 +2246,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -2438,7 +2436,7 @@ dependencies = [
"proc-macro-crate 3.1.0", "proc-macro-crate 3.1.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -2720,7 +2718,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"strsim 0.10.0", "strsim 0.10.0",
"syn 2.0.75", "syn 2.0.76",
"unic-langid", "unic-langid",
] ]
@ -2734,7 +2732,7 @@ dependencies = [
"i18n-config", "i18n-config",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -2763,7 +2761,7 @@ dependencies = [
[[package]] [[package]]
name = "iced" name = "iced"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
@ -2782,7 +2780,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_accessibility" name = "iced_accessibility"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_unix", "accesskit_unix",
@ -2792,7 +2790,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_core" name = "iced_core"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"dnd", "dnd",
@ -2814,7 +2812,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_futures" name = "iced_futures"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"futures", "futures",
"iced_core", "iced_core",
@ -2827,7 +2825,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_graphics" name = "iced_graphics"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"bytemuck", "bytemuck",
@ -2851,7 +2849,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_renderer" name = "iced_renderer"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"iced_graphics", "iced_graphics",
"iced_tiny_skia", "iced_tiny_skia",
@ -2863,7 +2861,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_runtime" name = "iced_runtime"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
@ -2877,7 +2875,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_sctk" name = "iced_sctk"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"enum-repr", "enum-repr",
"float-cmp", "float-cmp",
@ -2904,7 +2902,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_style" name = "iced_style"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"iced_core", "iced_core",
"once_cell", "once_cell",
@ -2914,7 +2912,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_tiny_skia" name = "iced_tiny_skia"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cosmic-text", "cosmic-text",
@ -2931,7 +2929,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_wgpu" name = "iced_wgpu"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"as-raw-xcb-connection", "as-raw-xcb-connection",
"bitflags 2.6.0", "bitflags 2.6.0",
@ -2960,7 +2958,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_widget" name = "iced_widget"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
@ -2978,7 +2976,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_winit" name = "iced_winit"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
@ -3155,7 +3153,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -3485,7 +3483,7 @@ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]] [[package]]
name = "libcosmic" name = "libcosmic"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic.git#ba7001ee5922105a4000c4a432acaabb5befb300" source = "git+https://github.com/pop-os/libcosmic.git#fdc04ddf1245bf42b085cb2b5c944b0bfce31a4e"
dependencies = [ dependencies = [
"apply", "apply",
"ashpd 0.9.1", "ashpd 0.9.1",
@ -3545,7 +3543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-targets 0.52.6", "windows-targets 0.48.5",
] ]
[[package]] [[package]]
@ -3573,7 +3571,6 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"libc", "libc",
"redox_syscall 0.5.3",
] ]
[[package]] [[package]]
@ -3834,6 +3831,15 @@ dependencies = [
"simd-adler32", "simd-adler32",
] ]
[[package]]
name = "miniz_oxide"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
"adler2",
]
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.8.11" version = "0.8.11"
@ -4124,7 +4130,7 @@ dependencies = [
"proc-macro-crate 3.1.0", "proc-macro-crate 3.1.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -4307,7 +4313,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -4347,7 +4353,7 @@ dependencies = [
"by_address", "by_address",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -4462,7 +4468,7 @@ dependencies = [
"phf_shared", "phf_shared",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -4499,7 +4505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [ dependencies = [
"atomic-waker", "atomic-waker",
"fastrand 2.1.0", "fastrand 2.1.1",
"futures-io", "futures-io",
] ]
@ -4519,7 +4525,7 @@ dependencies = [
"crc32fast", "crc32fast",
"fdeflate", "fdeflate",
"flate2", "flate2",
"miniz_oxide", "miniz_oxide 0.7.4",
] ]
[[package]] [[package]]
@ -4673,9 +4679,9 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.36" version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@ -4764,18 +4770,6 @@ dependencies = [
"font-types", "font-types",
] ]
[[package]]
name = "recently-used-xbel"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd9533c371523034735c8c68da31004561dd011df9d45d0e5886c141858a7d17"
dependencies = [
"dirs 4.0.0",
"serde",
"serde-xml-rs",
"thiserror",
]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.2.16" version = "0.2.16"
@ -4966,7 +4960,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"rust-embed-utils", "rust-embed-utils",
"syn 2.0.75", "syn 2.0.76",
"walkdir", "walkdir",
] ]
@ -5125,41 +5119,29 @@ checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.208" version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]]
name = "serde-xml-rs"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65162e9059be2f6a3421ebbb4fef3e74b7d9e7c60c50a0e292c6239f19f1edfa"
dependencies = [
"log",
"serde",
"thiserror",
"xml-rs",
]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.208" version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.125" version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"itoa", "itoa",
@ -5176,7 +5158,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -5393,7 +5375,7 @@ dependencies = [
"cocoa", "cocoa",
"core-graphics", "core-graphics",
"drm", "drm",
"fastrand 2.1.0", "fastrand 2.1.1",
"foreign-types", "foreign-types",
"js-sys", "js-sys",
"log", "log",
@ -5509,9 +5491,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.75" version = "2.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -5526,7 +5508,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -5603,7 +5585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"fastrand 2.1.0", "fastrand 2.1.1",
"once_cell", "once_cell",
"rustix 0.38.34", "rustix 0.38.34",
"windows-sys 0.59.0", "windows-sys 0.59.0",
@ -5637,7 +5619,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -5657,7 +5639,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -5813,7 +5795,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -5911,7 +5893,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -6093,9 +6075,9 @@ dependencies = [
[[package]] [[package]]
name = "unicode-properties" name = "unicode-properties"
version = "0.1.1" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524"
[[package]] [[package]]
name = "unicode-script" name = "unicode-script"
@ -6123,9 +6105,15 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
[[package]] [[package]]
name = "unicode-xid" name = "unicode-xid"
version = "0.2.4" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a"
[[package]]
name = "unix_permissions_ext"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7497808a85e03f612f13e9c5061e4c81cdee86e6c00adfa1096690990ccd08e9"
[[package]] [[package]]
name = "url" name = "url"
@ -6145,6 +6133,16 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
[[package]]
name = "users"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032"
dependencies = [
"libc",
"log",
]
[[package]] [[package]]
name = "usvg" name = "usvg"
version = "0.37.0" version = "0.37.0"
@ -6298,7 +6296,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -6332,7 +6330,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -6664,7 +6662,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -6759,7 +6757,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -6781,7 +6779,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -7248,7 +7246,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"synstructure", "synstructure",
] ]
@ -7356,7 +7354,7 @@ dependencies = [
"proc-macro-crate 3.1.0", "proc-macro-crate 3.1.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"zvariant_utils 2.1.0", "zvariant_utils 2.1.0",
] ]
@ -7406,7 +7404,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -7426,7 +7424,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"synstructure", "synstructure",
] ]
@ -7447,7 +7445,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
@ -7469,14 +7467,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]
[[package]] [[package]]
name = "zip" name = "zip"
version = "2.1.6" version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494"
dependencies = [ dependencies = [
"aes", "aes",
"arbitrary", "arbitrary",
@ -7602,7 +7600,7 @@ dependencies = [
"proc-macro-crate 3.1.0", "proc-macro-crate 3.1.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
"zvariant_utils 2.1.0", "zvariant_utils 2.1.0",
] ]
@ -7625,5 +7623,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.75", "syn 2.0.76",
] ]

View file

@ -17,17 +17,17 @@ freedesktop_entry_parser = { version = "1.3", optional = true }
fs_extra = { git = "https://github.com/pop-os/fs_extra.git" } fs_extra = { git = "https://github.com/pop-os/fs_extra.git" }
gio = { version = "0.19", optional = true } gio = { version = "0.19", optional = true }
glob = "0.3" glob = "0.3"
ignore = "0.4"
image = "0.24"
notify-rust = "4"
once_cell = "1.19"
open = "5.0.2"
icu_collator = "1.5" icu_collator = "1.5"
icu_provider = { version = "1.5", features = ["sync"] } icu_provider = { version = "1.5", features = ["sync"] }
ignore = "0.4"
image = "0.24"
libc = "0.2" libc = "0.2"
log = "0.4" log = "0.4"
mime_guess = "2" mime_guess = "2"
notify-debouncer-full = "0.3" notify-debouncer-full = "0.3"
notify-rust = { version = "4", optional = true }
once_cell = "1.19"
open = "5.0.2"
paste = "1.0" paste = "1.0"
rayon = "1" rayon = "1"
regex = "1" regex = "1"
@ -36,9 +36,9 @@ shlex = { version = "1.3" }
tar = "0.4.41" tar = "0.4.41"
tokio = { version = "1", features = ["sync"] } tokio = { version = "1", features = ["sync"] }
trash = { git = "https://github.com/jackpot51/trash-rs.git", branch = "delete-info" } trash = { git = "https://github.com/jackpot51/trash-rs.git", branch = "delete-info" }
url = "2.5"
xdg = { version = "2.5.2", optional = true } xdg = { version = "2.5.2", optional = true }
xdg-mime = "0.3" xdg-mime = "0.3"
url = "2.5"
# Internationalization # Internationalization
i18n-embed = { version = "0.14", features = [ i18n-embed = { version = "0.14", features = [
"fluent-system", "fluent-system",
@ -49,6 +49,8 @@ rust-embed = "8"
slotmap = "1.0.7" slotmap = "1.0.7"
recently-used-xbel = "1.0.0" recently-used-xbel = "1.0.0"
zip = "2.1.6" zip = "2.1.6"
unix_permissions_ext = "0.1.2"
users = "0.11.0"
[dependencies.libcosmic] [dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic.git" git = "https://github.com/pop-os/libcosmic.git"
@ -60,9 +62,10 @@ version = "0.2.1"
features = ["serde"] features = ["serde"]
[features] [features]
default = ["desktop", "gvfs", "winit", "wgpu"] default = ["desktop", "gvfs", "notify", "winit", "wgpu"]
desktop = ["libcosmic/desktop", "dep:freedesktop_entry_parser", "dep:xdg"] desktop = ["libcosmic/desktop", "dep:freedesktop_entry_parser", "dep:xdg"]
gvfs = ["dep:gio"] gvfs = ["dep:gio"]
notify = ["dep:notify-rust"]
wayland = ["libcosmic/wayland"] wayland = ["libcosmic/wayland"]
winit = ["libcosmic/winit"] winit = ["libcosmic/winit"]
wgpu = ["libcosmic/wgpu"] wgpu = ["libcosmic/wgpu"]

View file

@ -59,6 +59,15 @@ apply-to-all = Apply to all
keep-both = Keep both keep-both = Keep both
skip = Skip skip = Skip
## Metadata Dialog
owner = Owner
group = Group
other = Other
read = Read
write = Write
execute = Execute
# Context Pages # Context Pages
## About ## About

View file

@ -1,9 +1,10 @@
cosmic-files = Pliki COSMIC cosmic-files = Pliki COSMIC
empty-folder = Pusty katalog empty-folder = Pusty katalog
empty-folder-hidden = Pusty katalog (z ukrytymi plikami) empty-folder-hidden = Pusty katalog (z ukrytymi plikami)
no-results = Brak wyników
filesystem = System plików filesystem = System plików
home = Katalog Domowy home = Katalog Domowy
notification-in-progress = Są przeprowadzane operacje na plikach. notification-in-progress = Operacje na plikach w toku.
trash = Kosz trash = Kosz
undo = Cofnij undo = Cofnij
@ -36,6 +37,7 @@ open-file = Otwórz plik
open-folder = Otwórz katalog open-folder = Otwórz katalog
open-in-new-tab = Otwórz w nowej karcie open-in-new-tab = Otwórz w nowej karcie
open-in-new-window = Otwórz w nowym oknie open-in-new-window = Otwórz w nowym oknie
open-item-location = Otwórz położenie elementu
open-multiple-files = Otwórz wiele plików open-multiple-files = Otwórz wiele plików
open-multiple-folders = Otwórz wiele katalogów open-multiple-folders = Otwórz wiele katalogów
save = Zapisz save = Zapisz
@ -82,6 +84,15 @@ copied = Skopiowano {$items} {$items ->
} z {$from} do {$to} } z {$from} do {$to}
emptying-trash = Opróżnianie {trash} emptying-trash = Opróżnianie {trash}
emptied-trash = Opróżniono {trash} emptied-trash = Opróżniono {trash}
extracting = Wypakowywanie {$items} {$items ->
[one] elementu
*[other] elementów
} z {$from} do {$to}
extracted = Wypakowano {$items} {$items ->
[one] element
[few] elementy
*[other] elementów
} z {$from} do {$to}
moving = Przenoszenie {$items} {$items -> moving = Przenoszenie {$items} {$items ->
[one] elementu [one] elementu
*[other] elementów *[other] elementów
@ -132,6 +143,7 @@ dark = Ciemny
light = Jasny light = Jasny
# Context menu # Context menu
extract-here = Wypakuj
add-to-sidebar = Dodaj do bocznego panelu add-to-sidebar = Dodaj do bocznego panelu
new-file = Nowy plik new-file = Nowy plik
new-folder = Nowy katalog new-folder = Nowy katalog
@ -172,3 +184,8 @@ show-hidden-files = Pokaż ukryte pliki
list-directories-first = Najpierw wyświetlaj katalogi list-directories-first = Najpierw wyświetlaj katalogi
menu-settings = Ustawienia... menu-settings = Ustawienia...
menu-about = O Plikach COSMIC... menu-about = O Plikach COSMIC...
list-view = Widok listy
show-hidden-files = Pokaż ukryte pliki
list-directories-first = Najpierw wyświetlaj katalogi
menu-settings = Ustawienia...
menu-about = O Plikach COSMIC...

View file

@ -211,7 +211,7 @@ impl MenuAction for NavMenuAction {
pub enum Message { pub enum Message {
AddToSidebar(Option<Entity>), AddToSidebar(Option<Entity>),
AppTheme(AppTheme), AppTheme(AppTheme),
CloseToast(usize), CloseToast(widget::ToastId),
Config(Config), Config(Config),
Copy(Option<Entity>), Copy(Option<Entity>),
Cut(Option<Entity>), Cut(Option<Entity>),
@ -231,6 +231,7 @@ pub enum Message {
NavBarContext(Entity), NavBarContext(Entity),
NavMenuAction(NavMenuAction), NavMenuAction(NavMenuAction),
NewItem(Option<Entity>, bool), NewItem(Option<Entity>, bool),
#[cfg(feature = "notify")]
Notification(Arc<Mutex<notify_rust::NotificationHandle>>), Notification(Arc<Mutex<notify_rust::NotificationHandle>>),
NotifyEvents(Vec<DebouncedEvent>), NotifyEvents(Vec<DebouncedEvent>),
NotifyWatcher(WatcherWrapper), NotifyWatcher(WatcherWrapper),
@ -263,7 +264,7 @@ pub enum Message {
TabRescan(Entity, Location, Vec<tab::Item>, Option<PathBuf>), TabRescan(Entity, Location, Vec<tab::Item>, Option<PathBuf>),
ToggleContextPage(ContextPage), ToggleContextPage(ContextPage),
Undo(usize), Undo(usize),
UndoTrash(usize, Arc<[PathBuf]>), UndoTrash(widget::ToastId, Arc<[PathBuf]>),
UndoTrashStart(Vec<TrashItem>), UndoTrashStart(Vec<TrashItem>),
WindowClose, WindowClose,
WindowNew, WindowNew,
@ -368,6 +369,7 @@ pub struct App {
modifiers: Modifiers, modifiers: Modifiers,
mounters: Mounters, mounters: Mounters,
mounter_items: HashMap<MounterKey, MounterItems>, mounter_items: HashMap<MounterKey, MounterItems>,
#[cfg(feature = "notify")]
notification_opt: Option<Arc<Mutex<notify_rust::NotificationHandle>>>, notification_opt: Option<Arc<Mutex<notify_rust::NotificationHandle>>>,
pending_operation_id: u64, pending_operation_id: u64,
pending_operations: BTreeMap<u64, (Operation, f32)>, pending_operations: BTreeMap<u64, (Operation, f32)>,
@ -604,6 +606,7 @@ impl App {
fn update_notification(&mut self) -> Command<Message> { fn update_notification(&mut self) -> Command<Message> {
// Handle closing notification if there are no operations // Handle closing notification if there are no operations
if self.pending_operations.is_empty() { if self.pending_operations.is_empty() {
#[cfg(feature = "notify")]
if let Some(notification_arc) = self.notification_opt.take() { if let Some(notification_arc) = self.notification_opt.take() {
return Command::perform( return Command::perform(
async move { async move {
@ -1067,6 +1070,7 @@ impl Application for App {
modifiers: Modifiers::empty(), modifiers: Modifiers::empty(),
mounters: mounters(), mounters: mounters(),
mounter_items: HashMap::new(), mounter_items: HashMap::new(),
#[cfg(feature = "notify")]
notification_opt: None, notification_opt: None,
pending_operation_id: 0, pending_operation_id: 0,
pending_operations: BTreeMap::new(), pending_operations: BTreeMap::new(),
@ -1463,6 +1467,7 @@ impl Application for App {
} }
} }
} }
#[cfg(feature = "notify")]
Message::Notification(notification) => { Message::Notification(notification) => {
self.notification_opt = Some(notification); self.notification_opt = Some(notification);
} }
@ -2830,38 +2835,43 @@ impl Application for App {
//TODO: inhibit suspend/shutdown? //TODO: inhibit suspend/shutdown?
if self.window_id_opt.is_none() { if self.window_id_opt.is_none() {
struct NotificationSubscription; #[cfg(feature = "notify")]
subscriptions.push(subscription::channel( {
TypeId::of::<NotificationSubscription>(), struct NotificationSubscription;
1, subscriptions.push(subscription::channel(
move |msg_tx| async move { TypeId::of::<NotificationSubscription>(),
let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx)); 1,
tokio::task::spawn_blocking(move || match notify_rust::Notification::new() move |msg_tx| async move {
.summary(&fl!("notification-in-progress")) let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx));
.timeout(notify_rust::Timeout::Never) tokio::task::spawn_blocking(move || {
.show() match notify_rust::Notification::new()
{ .summary(&fl!("notification-in-progress"))
Ok(notification) => { .timeout(notify_rust::Timeout::Never)
let _ = futures::executor::block_on(async { .show()
msg_tx {
.lock() Ok(notification) => {
.await let _ = futures::executor::block_on(async {
.send(Message::Notification(Arc::new(Mutex::new( msg_tx
notification, .lock()
)))) .await
.await .send(Message::Notification(Arc::new(Mutex::new(
}); notification,
} ))))
Err(err) => { .await
log::warn!("failed to create notification: {}", err); });
} }
}) Err(err) => {
.await log::warn!("failed to create notification: {}", err);
.unwrap(); }
}
})
.await
.unwrap();
pending().await pending().await
}, },
)); ));
}
} }
} }

View file

@ -59,11 +59,27 @@ use std::{
fmt, fmt,
fs::{self, Metadata}, fs::{self, Metadata},
num::NonZeroU16, num::NonZeroU16,
os::unix::fs::MetadataExt,
path::PathBuf, path::PathBuf,
sync::{Arc, Mutex}, sync::{Arc, Mutex},
time::{Duration, Instant}, time::{Duration, Instant},
}; };
use crate::{
app::{self, Action},
clipboard::{ClipboardCopy, ClipboardKind, ClipboardPaste},
config::{IconSizes, TabConfig, ICON_SCALE_MAX, ICON_SIZE_GRID},
dialog::DialogKind,
fl,
localize::{LANGUAGE_CHRONO, LANGUAGE_SORTER},
menu,
mime_app::{mime_apps, MimeApp},
mime_icon::{mime_for_path, mime_icon},
mouse_area,
};
use unix_permissions_ext::UNIXPermissionsExt;
use users::{get_group_by_gid, get_user_by_uid};
pub const DOUBLE_CLICK_DURATION: Duration = Duration::from_millis(500); pub const DOUBLE_CLICK_DURATION: Duration = Duration::from_millis(500);
pub const HOVER_DURATION: Duration = Duration::from_millis(1600); pub const HOVER_DURATION: Duration = Duration::from_millis(1600);
@ -202,6 +218,49 @@ fn format_size(size: u64) -> String {
format!("{} B", size) format!("{} B", size)
} }
} }
enum PermissionOwner {
Owner,
Group,
Other,
}
fn format_permissions_owner(metadata: &Metadata, owner: PermissionOwner) -> String {
return match owner {
PermissionOwner::Owner => get_user_by_uid(metadata.uid())
.and_then(|user| user.name().to_str().map(ToOwned::to_owned))
.unwrap_or_default(),
PermissionOwner::Group => get_group_by_gid(metadata.gid())
.and_then(|group| group.name().to_str().map(ToOwned::to_owned))
.unwrap_or_default(),
PermissionOwner::Other => String::from(""),
};
}
fn format_permissions(metadata: &Metadata, owner: PermissionOwner) -> String {
let mut perms: Vec<String> = Vec::new();
if match owner {
PermissionOwner::Owner => metadata.permissions().readable_by_owner(),
PermissionOwner::Group => metadata.permissions().readable_by_group(),
PermissionOwner::Other => metadata.permissions().readable_by_other(),
} {
perms.push(fl!("read"));
}
if match owner {
PermissionOwner::Owner => metadata.permissions().writable_by_owner(),
PermissionOwner::Group => metadata.permissions().writable_by_group(),
PermissionOwner::Other => metadata.permissions().writable_by_other(),
} {
perms.push(fl!("write"));
}
if match owner {
PermissionOwner::Owner => metadata.permissions().executable_by_owner(),
PermissionOwner::Group => metadata.permissions().executable_by_group(),
PermissionOwner::Other => metadata.permissions().executable_by_other(),
} {
perms.push(fl!("execute"));
}
perms.join(" ")
}
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
fn hidden_attribute(_metadata: &Metadata) -> bool { fn hidden_attribute(_metadata: &Metadata) -> bool {
@ -907,6 +966,46 @@ impl Item {
.format_localized(TIME_FORMAT, *LANGUAGE_CHRONO) .format_localized(TIME_FORMAT, *LANGUAGE_CHRONO)
))); )));
} }
#[cfg(not(target_os = "windows"))]
{
column = column.push(
widget::Row::new()
.push(widget::text(format!("{}:", fl!("owner"))))
.push(widget::text(format_permissions_owner(
metadata,
PermissionOwner::Owner,
)))
.push(widget::text(format!(
"({})",
format_permissions(metadata, PermissionOwner::Owner,)
)))
.spacing(10),
);
column = column.push(
widget::Row::new()
.push(widget::text(format!("{}:", fl!("group"))))
.push(widget::text(format_permissions_owner(
metadata,
PermissionOwner::Group,
)))
.push(widget::text(format!(
"({})",
format_permissions(metadata, PermissionOwner::Group,)
)))
.spacing(10),
);
column = column.push(
widget::Row::new()
.push(widget::text(format!("{}", fl!("other"))))
.push(widget::text(format!(
"({})",
format_permissions(metadata, PermissionOwner::Other,)
)))
.spacing(10),
);
}
} }
ItemMetadata::Trash { .. } => { ItemMetadata::Trash { .. } => {
//TODO: trash metadata //TODO: trash metadata