diff --git a/Cargo.lock b/Cargo.lock index 372e8c9..6248f7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,12 +215,6 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "almost" version = "0.2.0" @@ -320,12 +314,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "as-raw-xcb-connection" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" - [[package]] name = "as-slice" version = "0.2.1" @@ -993,7 +981,6 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "objc", "objc-foundation", @@ -1003,22 +990,12 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "dnd", "mime 0.1.0", "smithay-clipboard", ] -[[package]] -name = "clipboard_x11" -version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" -dependencies = [ - "thiserror 1.0.69", - "x11rb", -] - [[package]] name = "cmov" version = "0.5.3" @@ -1318,7 +1295,6 @@ dependencies = [ [[package]] name = "cosmic-client-toolkit" version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=160b086#160b086abe03cd34a8a375d7fbe47b24308d1f38" dependencies = [ "bitflags 2.11.1", "cosmic-protocols", @@ -1331,7 +1307,6 @@ dependencies = [ [[package]] name = "cosmic-config" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1352,7 +1327,6 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "quote", "syn", @@ -1360,12 +1334,10 @@ dependencies = [ [[package]] name = "cosmic-files" -version = "1.0.12" -source = "git+https://github.com/pop-os/cosmic-files.git#77615fc6b5ca349769ab4e2aa148f8fd0921e4b8" +version = "1.0.11" dependencies = [ "anyhow", "atomic_float", - "bstr", "compio", "cosmic-client-toolkit", "dirs 6.0.0", @@ -1382,7 +1354,7 @@ dependencies = [ "jiff-icu", "jxl-oxide", "libc", - "libcosmic", + "libcosmic-yoda", "log", "md-5", "mime_guess", @@ -1434,7 +1406,6 @@ dependencies = [ [[package]] name = "cosmic-protocols" version = "0.2.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=160b086#160b086abe03cd34a8a375d7fbe47b24308d1f38" dependencies = [ "bitflags 2.11.1", "wayland-backend", @@ -1467,7 +1438,7 @@ dependencies = [ "i18n-embed-fl", "icu", "indexmap", - "libcosmic", + "libcosmic-yoda", "log", "open", "paste", @@ -1487,8 +1458,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be17b688510d934ce13f48a2beba700e11583e281e0fda99c22bb256a14eda73" +source = "git+https://forge.aditua.com/leyoda/cosmic-text.git?branch=local%2Fpr-503#63072bbe29a1657d82cd3deb5db45070404ec7a1" dependencies = [ "bitflags 2.11.1", "fontdb", @@ -1506,12 +1476,12 @@ dependencies = [ "unicode-linebreak", "unicode-script", "unicode-segmentation", + "unicode-width", ] [[package]] name = "cosmic-theme" version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "almost", "configparser", @@ -1601,7 +1571,7 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "cryoglyph" version = "0.1.0" -source = "git+https://github.com/iced-rs/cryoglyph.git?rev=e429a025df36ab8145708acb309080ae3deec17a#e429a025df36ab8145708acb309080ae3deec17a" +source = "git+https://github.com/pop-os/glyphon.git?tag=cosmic-0.14#c49de15bce4d8254ac136d1be9911960cc85ce12" dependencies = [ "cosmic-text", "etagere", @@ -1647,15 +1617,6 @@ dependencies = [ "uncased", ] -[[package]] -name = "ctor" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cf0d42651b16c6dfe68685716d18480d18a9c39c62d76e8cf3eb6ed5d8bcbf" -dependencies = [ - "dtor", -] - [[package]] name = "ctutils" version = "0.4.2" @@ -1872,7 +1833,6 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "bitflags 2.11.1", "mime 0.1.0", @@ -1901,51 +1861,6 @@ name = "dpi" version = "0.1.2" source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" -[[package]] -name = "drm" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" -dependencies = [ - "bitflags 2.11.1", - "bytemuck", - "drm-ffi", - "drm-fourcc", - "rustix 0.38.44", -] - -[[package]] -name = "drm-ffi" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" -dependencies = [ - "drm-sys", - "rustix 0.38.44", -] - -[[package]] -name = "drm-fourcc" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" - -[[package]] -name = "drm-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" -dependencies = [ - "libc", - "linux-raw-sys 0.6.5", -] - -[[package]] -name = "dtor" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf234dd1594d6dd434a8fb8cada51ddbbc593e40e4a01556a0b31c62da2775b" - [[package]] name = "either" version = "1.15.0" @@ -2483,16 +2398,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" -dependencies = [ - "rustix 1.1.4", - "windows-link 0.2.1", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -2609,17 +2514,34 @@ dependencies = [ ] [[package]] -name = "gpu-allocator" -version = "0.28.0" +name = "gpu-alloc" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" +dependencies = [ + "bitflags 2.11.1", + "gpu-alloc-types", +] + +[[package]] +name = "gpu-alloc-types" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" +dependencies = [ + "bitflags 2.11.1", +] + +[[package]] +name = "gpu-allocator" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ - "ash", - "hashbrown 0.16.1", "log", "presser", - "thiserror 2.0.18", - "windows 0.62.2", + "thiserror 1.0.69", + "windows 0.56.0", ] [[package]] @@ -2698,8 +2620,6 @@ version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.2.0", ] @@ -2889,7 +2809,6 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "dnd", "iced_accessibility", @@ -2910,7 +2829,6 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "accesskit", "accesskit_winit", @@ -2919,7 +2837,6 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "bitflags 2.11.1", "bytes", @@ -2943,7 +2860,6 @@ dependencies = [ [[package]] name = "iced_debug" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "iced_core", "iced_futures", @@ -2953,7 +2869,6 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "futures", "iced_core", @@ -2967,7 +2882,6 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "bitflags 2.11.1", "bytemuck", @@ -2988,7 +2902,6 @@ dependencies = [ [[package]] name = "iced_program" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "iced_graphics", "iced_runtime", @@ -2997,7 +2910,6 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3009,7 +2921,6 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3024,7 +2935,6 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "bytemuck", "cosmic-text", @@ -3041,9 +2951,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ - "as-raw-xcb-connection", "bitflags 2.11.1", "bytemuck", "cosmic-client-toolkit", @@ -3060,19 +2968,16 @@ dependencies = [ "rustc-hash 2.1.2", "rustix 0.38.44", "thiserror 2.0.18", - "tiny-xlib", "wayland-backend", "wayland-client", "wayland-protocols", "wayland-sys", "wgpu", - "x11rb", ] [[package]] name = "iced_widget" version = "0.14.2" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3090,7 +2995,6 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" dependencies = [ "cosmic-client-toolkit", "cursor-icon", @@ -4172,9 +4076,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] -name = "libcosmic" -version = "1.0.0" -source = "git+https://github.com/pop-os/libcosmic.git#4fab6c777dbd1a023440f08fb2b729c86492366c" +name = "libcosmic-yoda" +version = "0.1.0-yoda.2" dependencies = [ "apply", "ashpd 0.12.3", @@ -4276,12 +4179,6 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" -[[package]] -name = "linux-raw-sys" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7" - [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -4478,9 +4375,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.33.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7047791b5bc903b8cd963014b355f71dc9864a9a0b727057676c1dcae5cbc15" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ "bitflags 2.11.1", "block", @@ -4494,7 +4391,6 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "smithay-clipboard", ] @@ -4570,9 +4466,9 @@ checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" [[package]] name = "naga" -version = "28.0.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618f667225063219ddfc61251087db8a9aec3c3f0950c916b614e403486f1135" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", @@ -6430,12 +6326,10 @@ name = "softbuffer" version = "0.4.1" source = "git+https://github.com/pop-os/softbuffer?tag=cosmic-4.0#c2b2c19ddb38ff17495643699f97cb1f2064a1be" dependencies = [ - "as-raw-xcb-connection", "bytemuck", "cfg_aliases", "cocoa", "core-graphics", - "drm", "fastrand", "foreign-types", "js-sys", @@ -6445,14 +6339,12 @@ dependencies = [ "raw-window-handle", "redox_syscall 0.5.18", "rustix 0.38.44", - "tiny-xlib", "wasm-bindgen", "wayland-backend", "wayland-client", "wayland-sys", "web-sys", "windows-sys 0.52.0", - "x11rb", ] [[package]] @@ -6734,19 +6626,6 @@ dependencies = [ "strict-num", ] -[[package]] -name = "tiny-xlib" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90a0ca3ee6a69f2ad28fd11621a4c3f03b371f366be500b64df260c4ffbafb4" -dependencies = [ - "as-raw-xcb-connection", - "ctor", - "libloading", - "pkg-config", - "tracing", -] - [[package]] name = "tinystr" version = "0.8.3" @@ -7508,13 +7387,12 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "28.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cb534d5ffd109c7d1135f34cdae29e60eab94855a625dcfe1705f8bc7ad79f" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", "bitflags 2.11.1", - "bytemuck", "cfg-if", "cfg_aliases", "document-features", @@ -7538,9 +7416,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "28.0.1" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23f4642f53f666adcfd2d3218ab174d1e6681101aef18696b90cbe64d1c10f9" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", "bit-set", @@ -7570,36 +7448,36 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b7b696b918f337c486bf93142454080a32a37832ba8a31e4f48221890047da" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b251c331f84feac147de3c4aa3aa45112622a95dd7ee1b74384fa0458dbd79" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "28.0.0" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca976e72b2c9964eb243e281f6ce7f14a514e409920920dcda12ae40febaae" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "28.0.1" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d6cb474beb218824dcc9e1ce679d973f719262789bfb27407da560cac20eeb" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", @@ -7613,6 +7491,7 @@ dependencies = [ "core-graphics-types 0.2.0", "glow", "glutin_wgl_sys", + "gpu-alloc", "gpu-allocator", "gpu-descriptor", "hashbrown 0.16.1", @@ -7639,20 +7518,21 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "windows 0.62.2", - "windows-core 0.62.2", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "28.0.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e18308757e594ed2cd27dddbb16a139c42a683819d32a2e0b1b0167552f5840c" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ "bitflags 2.11.1", "bytemuck", "js-sys", "log", + "thiserror 2.0.18", "web-sys", ] @@ -7696,12 +7576,10 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=sctk-0.20#f68595ee0e62fbd6589f4709b5aaa5c3c7ea5f6c" dependencies = [ "clipboard-win", "clipboard_macos", "clipboard_wayland", - "clipboard_x11", "dnd", "mime 0.1.0", "raw-window-handle", @@ -7720,27 +7598,25 @@ dependencies = [ [[package]] name = "windows" -version = "0.61.3" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-collections 0.2.0", - "windows-core 0.61.2", - "windows-future 0.2.1", - "windows-link 0.1.3", - "windows-numerics 0.2.0", + "windows-core 0.58.0", + "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.62.2" +version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections 0.3.2", - "windows-core 0.62.2", - "windows-future 0.3.2", - "windows-numerics 0.3.1", + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", ] [[package]] @@ -7752,15 +7628,6 @@ dependencies = [ "windows-core 0.61.2", ] -[[package]] -name = "windows-collections" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" -dependencies = [ - "windows-core 0.62.2", -] - [[package]] name = "windows-core" version = "0.56.0" @@ -7773,6 +7640,19 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.61.2" @@ -7807,18 +7687,7 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ "windows-core 0.61.2", "windows-link 0.1.3", - "windows-threading 0.1.0", -] - -[[package]] -name = "windows-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" -dependencies = [ - "windows-core 0.62.2", - "windows-link 0.2.1", - "windows-threading 0.2.1", + "windows-threading", ] [[package]] @@ -7832,6 +7701,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-implement" version = "0.60.2" @@ -7854,6 +7734,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-interface" version = "0.59.3" @@ -7887,16 +7778,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-numerics" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" -dependencies = [ - "windows-core 0.62.2", - "windows-link 0.2.1", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -7906,6 +7787,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -7924,6 +7814,16 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-strings" version = "0.4.2" @@ -8044,15 +7944,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-threading" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -8214,7 +8105,6 @@ dependencies = [ "winit-wayland", "winit-web", "winit-win32", - "winit-x11", ] [[package]] @@ -8265,7 +8155,6 @@ dependencies = [ "smol_str", "tracing", "winit-core", - "x11-dl", "xkbcommon-dl", ] @@ -8383,29 +8272,6 @@ dependencies = [ "winit-core", ] -[[package]] -name = "winit-x11" -version = "0.31.0-beta.2" -source = "git+https://github.com/pop-os/winit.git?tag=cosmic-0.14#261cda54017f98a12dc55569c864430fe6770366" -dependencies = [ - "bitflags 2.11.1", - "bytemuck", - "calloop", - "cursor-icon", - "dpi", - "libc", - "percent-encoding", - "raw-window-handle", - "rustix 1.1.4", - "smol_str", - "tracing", - "winit-common", - "winit-core", - "x11-dl", - "x11rb", - "xkbcommon-dl", -] - [[package]] name = "winnow" version = "1.0.2" @@ -8524,39 +8390,6 @@ dependencies = [ "either", ] -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x11rb" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" -dependencies = [ - "as-raw-xcb-connection", - "gethostname", - "libc", - "libloading", - "once_cell", - "rustix 1.1.4", - "x11rb-protocol", - "xcursor", -] - -[[package]] -name = "x11rb-protocol" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" - [[package]] name = "xattr" version = "1.6.1" diff --git a/Cargo.toml b/Cargo.toml index 7315cbf..24a332a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,15 +36,17 @@ thiserror = { version = "2.0", optional = true } secstr = { version = "0.5", optional = true } [dependencies.cosmic-files] -git = "https://github.com/pop-os/cosmic-files.git" +path = "../cosmic-files" default-features = false [dependencies.cosmic-text] -version = "0.19" +git = "https://forge.aditua.com/leyoda/cosmic-text.git" +branch = "local/pr-503" features = ["monospace_fallback", "shape-run-cache"] -[dependencies.libcosmic] -git = "https://github.com/pop-os/libcosmic.git" +[dependencies.cosmic] +package = "libcosmic-yoda" +path = "../libcosmic" default-features = false #TODO: a11y feature crashes file chooser dialog features = ["about", "autosize", "multi-window", "tokio", "winit", "surface-message"] @@ -57,9 +59,9 @@ xdgen = "0.1" [features] default = ["dbus-config", "wgpu", "wayland", "password_manager"] -dbus-config = ["libcosmic/dbus-config"] -wgpu = ["libcosmic/wgpu", "cosmic-files/wgpu"] -wayland = ["libcosmic/wayland", "cosmic-files/wayland"] +dbus-config = ["cosmic/dbus-config"] +wgpu = ["cosmic/wgpu", "cosmic-files/wgpu"] +wayland = ["cosmic/wayland", "cosmic-files/wayland"] password_manager = ["secret-service", "thiserror", "secstr"] [profile.release-with-debug] @@ -67,7 +69,29 @@ inherits = "release" debug = true -#[patch.'https://github.com/pop-os/libcosmic'] -#libcosmic = { path = "../libcosmic" } -#cosmic-config = { path = "../libcosmic/cosmic-config" } -#cosmic-theme = { path = "../libcosmic/cosmic-theme" } +[patch.'https://github.com/pop-os/libcosmic'] +cosmic-config = { path = "../libcosmic/cosmic-config" } +cosmic-theme = { path = "../libcosmic/cosmic-theme" } +iced = { path = "../libcosmic/iced" } +iced_accessibility = { path = "../libcosmic/iced/accessibility" } +iced_core = { path = "../libcosmic/iced/core" } +iced_futures = { path = "../libcosmic/iced/futures" } +iced_graphics = { path = "../libcosmic/iced/graphics" } +iced_renderer = { path = "../libcosmic/iced/renderer" } +iced_runtime = { path = "../libcosmic/iced/runtime" } +iced_tiny_skia = { path = "../libcosmic/iced/tiny_skia" } +iced_wgpu = { path = "../libcosmic/iced/wgpu" } +iced_widget = { path = "../libcosmic/iced/widget" } +iced_winit = { path = "../libcosmic/iced/winit" } + +[patch.'https://github.com/pop-os/cosmic-protocols'] +cosmic-protocols = { path = "../cosmic-protocols" } +cosmic-client-toolkit = { path = "../cosmic-protocols/client-toolkit" } + +[patch.'https://github.com/pop-os/cosmic-text.git'] +cosmic-text = { git = "https://forge.aditua.com/leyoda/cosmic-text.git", branch = "local/pr-503" } + +[patch.'https://forge.aditua.com/leyoda/window_clipboard.git'] +window_clipboard = { path = "../window_clipboard" } +dnd = { path = "../window_clipboard/dnd" } +mime = { path = "../window_clipboard/mime" } diff --git a/i18n/en/cosmic_term.ftl b/i18n/en/cosmic_term.ftl index e2e459f..e7d5718 100644 --- a/i18n/en/cosmic_term.ftl +++ b/i18n/en/cosmic_term.ftl @@ -70,6 +70,7 @@ tab-new-inherit-working-directory-description = Open new tabs in the active tab' add-another-keybinding = Add another keybinding cancel = Cancel close-window = Close window +confirm = Confirm copy-or-sigint = Copy or SIGINT disable = Disable focus-pane-down = Focus pane down @@ -83,6 +84,7 @@ password-manager = Password manager paste-primary = Paste primary replace = Replace reset-to-default = Reset to default +reset = Reset shortcut-capture-hint = Press the key combination shortcut-group-clipboard = Clipboard shortcut-group-other = Other @@ -92,6 +94,9 @@ shortcut-group-zoom = Zoom shortcut-replace-body = { $binding } is already assigned to { $existing }. Replace it with { $new_action }? shortcut-replace-title = Replace shortcut? tab-activate = Activate tab { $number } +rename-tab = Rename tab +tab-name-placeholder = Tab name +tab-rename-title = Rename tab toggle-fullscreen = Toggle fullscreen type-to-search = Type to search... diff --git a/i18n/fr/cosmic_term.ftl b/i18n/fr/cosmic_term.ftl index e702e04..8a80609 100644 --- a/i18n/fr/cosmic_term.ftl +++ b/i18n/fr/cosmic_term.ftl @@ -121,6 +121,7 @@ copy-link = Copier le lien add-another-keybinding = Ajouter un autre raccourci clavier cancel = Annuler close-window = Fermer la fenêtre +confirm = Confirmer copy-or-sigint = Copier ou SIGINT disable = Désactiver keyboard-shortcuts = Raccourcis clavier @@ -144,7 +145,11 @@ focus-pane-left = Passer au panneau de gauche focus-pane-right = Passer au panneau de droite focus-pane-up = Passer au panneau du dessus reset-to-default = Rétablir les paramètres par défaut +reset = Réinitialiser toggle-fullscreen = Basculer en plein écran +rename-tab = Renommer l'onglet +tab-name-placeholder = Nom de l'onglet +tab-rename-title = Renommer l'onglet comment = Émulateur de terminal pour le bureau COSMIC keywords = Commande;Shell;Terminal;CLI; tab-new-inherit-working-directory = Les nouveaux onglets utilisent le répertoire actuel diff --git a/src/main.rs b/src/main.rs index e8469d3..0cf5222 100644 --- a/src/main.rs +++ b/src/main.rs @@ -277,6 +277,7 @@ pub enum Action { TabNewNoProfile, TabNext, TabPrev, + TabRename, ToggleFullscreen, WindowClose, WindowNew, @@ -330,6 +331,7 @@ impl Action { Self::TabNewNoProfile => Message::TabNewNoProfile, Self::TabNext => Message::TabNext, Self::TabPrev => Message::TabPrev, + Self::TabRename => Message::TabRenameOpen(entity_opt), Self::ToggleFullscreen => Message::ToggleFullscreen, Self::WindowClose => Message::WindowClose, Self::WindowNew => Message::WindowNew, @@ -437,6 +439,12 @@ pub enum Message { TabNewNoProfile, TabNext, TabPrev, + TabRenameOpenForPane(pane_grid::Pane, segmented_button::Entity), + TabRenameOpen(Option), + TabRenameInput(String), + TabRenameCommit, + TabRenameCancel, + TabRenameResetToDefault, TermEvent(pane_grid::Pane, segmented_button::Entity, TermEvent), TermEventTx(mpsc::UnboundedSender<(pane_grid::Pane, segmented_button::Entity, TermEvent)>), ToggleFullscreen, @@ -510,6 +518,8 @@ pub struct App { color_scheme_expanded: Option<(ColorSchemeKind, Option)>, color_scheme_renaming: Option<(ColorSchemeKind, ColorSchemeId, String)>, color_scheme_rename_id: widget::Id, + rename_tab: Option<(segmented_button::Entity, String)>, + rename_tab_id: widget::Id, color_scheme_tab_model: widget::segmented_button::SingleSelectModel, profile_expanded: Option, show_advanced_font_settings: bool, @@ -758,7 +768,9 @@ impl App { } fn update_focus(&self) -> Task { - if self.find { + if self.rename_tab.is_some() { + widget::text_input::focus(self.rename_tab_id.clone()) + } else if self.find { widget::text_input::focus(self.find_search_id.clone()) } else if self.core.window.show_context { // Right now we only care about the KeyboardShortcuts context page, so we use a simple if. @@ -1872,6 +1884,8 @@ impl Application for App { color_scheme_expanded: None, color_scheme_renaming: None, color_scheme_rename_id: widget::Id::unique(), + rename_tab: None, + rename_tab_id: widget::Id::unique(), color_scheme_tab_model: widget::segmented_button::Model::default(), profile_expanded: None, show_advanced_font_settings: false, @@ -3019,6 +3033,64 @@ impl Application for App { } } } + Message::TabRenameOpenForPane(pane, entity) => { + self.pane_model.set_focus(pane); + return self.update(Message::TabRenameOpen(Some(entity))); + } + Message::TabRenameOpen(entity_opt) => { + if let Some(tab_model) = self.pane_model.active() { + let entity = entity_opt.unwrap_or_else(|| tab_model.active()); + let initial = tab_model + .text(entity) + .map(|s| s.to_string()) + .unwrap_or_default(); + self.rename_tab = Some((entity, initial)); + self.pane_model.unfocus_all_terminals(); + return self.update_focus(); + } + } + Message::TabRenameInput(value) => { + if let Some((_, buffer)) = self.rename_tab.as_mut() { + *buffer = value; + } + } + Message::TabRenameCommit => { + if let Some((entity, value)) = self.rename_tab.take() { + let trimmed = value.trim().to_string(); + if let Some(tab_model) = self.pane_model.active_mut() { + if trimmed.is_empty() { + if let Some(terminal) = tab_model.data::>(entity) { + terminal.lock().unwrap().tab_title_override = None; + } + tab_model.text_set(entity, fl!("new-terminal")); + } else { + if let Some(terminal) = tab_model.data::>(entity) { + terminal.lock().unwrap().tab_title_override = Some(trimmed.clone()); + } + tab_model.text_set(entity, trimmed); + } + } + self.pane_model.update_terminal_focus(); + return self.update_title(None); + } + } + Message::TabRenameCancel => { + self.rename_tab = None; + self.pane_model.update_terminal_focus(); + } + Message::TabRenameResetToDefault => { + if let Some((entity, _)) = self.rename_tab.take() + && let Some(tab_model) = self.pane_model.active_mut() + { + if let Some(terminal) = tab_model.data::>(entity) { + terminal.lock().unwrap().tab_title_override = None; + } + tab_model.text_set(entity, fl!("new-terminal")); + self.pane_model.update_terminal_focus(); + return self.update_title(None); + } + self.pane_model.update_terminal_focus(); + } Message::TermEvent(pane, entity, event) => { match event { TermEvent::Bell => { @@ -3335,6 +3407,31 @@ impl Application for App { } fn dialog(&self) -> Option> { + if let Some((_, buffer)) = self.rename_tab.as_ref() { + let input = widget::text_input(fl!("tab-name-placeholder"), buffer) + .id(self.rename_tab_id.clone()) + .on_input(Message::TabRenameInput) + .on_submit(|_| Message::TabRenameCommit); + + return Some( + widget::dialog() + .title(fl!("tab-rename-title")) + .control(input) + .primary_action( + widget::button::suggested(fl!("confirm")) + .on_press(Message::TabRenameCommit), + ) + .secondary_action( + widget::button::standard(fl!("cancel")).on_press(Message::TabRenameCancel), + ) + .tertiary_action( + widget::button::text(fl!("reset")) + .on_press(Message::TabRenameResetToDefault), + ) + .into(), + ); + } + let conflict = self.shortcut_conflict.as_ref()?; let binding = shortcuts::binding_display(&conflict.binding); let existing = shortcuts::action_label(conflict.existing_action); @@ -3409,34 +3506,31 @@ impl Application for App { let pane_grid = PaneGrid::new(&self.pane_model.panes, |pane, tab_model, _is_maximized| { let mut tab_column = widget::column::with_capacity(1); - if tab_model.iter().count() > 1 { - tab_column = tab_column.push( - widget::container( - widget::tab_bar::horizontal(tab_model) - .enable_tab_drag(String::from("x-cosmic-term/tab")) - .on_reorder(move |event| Message::ReorderTab(pane, event)) - .tab_drag_threshold(25.) - .button_height(32) - .button_spacing(space_xxs) - .on_activate(Message::TabActivate) - .on_close(|entity| Message::TabClose(Some(entity))), - ) - .class(style::Container::Custom(Box::new(|theme| { - let cosmic = theme.cosmic(); - cosmic::iced::widget::container::Style { - icon_color: Some(Color::from(cosmic.background.on)), - text_color: Some(Color::from(cosmic.background.on)), - background: Some(iced::Background::Color( - cosmic.background.base.into(), - )), - border: iced::Border::default(), - shadow: iced::Shadow::default(), - snap: true, - } - }))) - .width(Length::Fill), - ); - } + tab_column = tab_column.push( + widget::container( + widget::tab_bar::horizontal(tab_model) + .enable_tab_drag(String::from("x-cosmic-term/tab")) + .on_reorder(move |event| Message::ReorderTab(pane, event)) + .tab_drag_threshold(25.) + .button_height(32) + .button_spacing(space_xxs) + .on_activate(Message::TabActivate) + .on_close(|entity| Message::TabClose(Some(entity))) + .on_context(move |entity| Message::TabRenameOpenForPane(pane, entity)), + ) + .class(style::Container::Custom(Box::new(|theme| { + let cosmic = theme.cosmic(); + cosmic::iced::widget::container::Style { + icon_color: Some(Color::from(cosmic.background.on)), + text_color: Some(Color::from(cosmic.background.on)), + background: Some(iced::Background::Color(cosmic.background.base.into())), + border: iced::Border::default(), + shadow: iced::Shadow::default(), + snap: true, + } + }))) + .width(Length::Fill), + ); let entity = tab_model.active(); let entity_middle_click = tab_model.active(); @@ -3448,7 +3542,7 @@ impl Application for App { if let Some(terminal) = tab_model.data::>(entity) { let mut terminal_box = terminal_box(terminal, &self.key_binds) .id(terminal_id) - .disabled(self.core.window.show_context) + .disabled(self.core.window.show_context || self.rename_tab.is_some()) .on_context_menu(move |menu_state| Message::TabContextMenu(pane, menu_state)) .on_middle_click(move || Message::MiddleClick(pane, Some(entity_middle_click))) .on_open_hyperlink(Some(Box::new(Message::LaunchUrl))) diff --git a/src/menu.rs b/src/menu.rs index a10ca75..d2fdd00 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -94,7 +94,9 @@ pub fn context_menu<'a>( )), Element::from(divider::horizontal::light()), Element::from(menu_item(fl!("new-tab"), Action::TabNew)), + Element::from(menu_item(fl!("rename-tab"), Action::TabRename)), Element::from(menu_item(fl!("menu-settings"), Action::Settings)), + Element::from(menu_item(fl!("menu-about"), Action::About)), ]; #[cfg(feature = "password_manager")] { @@ -224,6 +226,7 @@ pub fn menu_bar<'a>( MenuItem::Folder(fl!("profile"), profile_items), MenuItem::Button(fl!("menu-profiles"), None, Action::Profiles), MenuItem::Divider, + MenuItem::Button(fl!("rename-tab"), None, Action::TabRename), MenuItem::Button(fl!("close-tab"), None, Action::TabClose), MenuItem::Divider, MenuItem::Button(fl!("quit"), None, Action::WindowClose), diff --git a/src/shortcuts.rs b/src/shortcuts.rs index 503c8de..43dd017 100644 --- a/src/shortcuts.rs +++ b/src/shortcuts.rs @@ -87,6 +87,7 @@ pub enum KeyBindAction { TabNew, TabNext, TabPrev, + TabRename, ToggleFullscreen, WindowClose, WindowNew, @@ -127,6 +128,7 @@ impl KeyBindAction { Self::TabNew => Some(Action::TabNew), Self::TabNext => Some(Action::TabNext), Self::TabPrev => Some(Action::TabPrev), + Self::TabRename => Some(Action::TabRename), Self::ToggleFullscreen => Some(Action::ToggleFullscreen), Self::WindowClose => Some(Action::WindowClose), Self::WindowNew => Some(Action::WindowNew), @@ -288,6 +290,7 @@ pub fn action_label(action: KeyBindAction) -> String { KeyBindAction::TabNew => fl!("new-tab"), KeyBindAction::TabNext => fl!("next-tab"), KeyBindAction::TabPrev => fl!("previous-tab"), + KeyBindAction::TabRename => fl!("rename-tab"), KeyBindAction::ToggleFullscreen => fl!("toggle-fullscreen"), KeyBindAction::WindowClose => fl!("close-window"), KeyBindAction::WindowNew => fl!("new-window"), @@ -320,6 +323,7 @@ pub fn shortcut_groups() -> Vec { actions: vec![ KeyBindAction::TabNew, KeyBindAction::TabClose, + KeyBindAction::TabRename, KeyBindAction::TabNext, KeyBindAction::TabPrev, KeyBindAction::TabActivate0, @@ -454,6 +458,7 @@ fn fallback_shortcuts() -> Shortcuts { bind!([Ctrl, Shift], "V", Paste); bind!([Shift], "Insert", PastePrimary); bind!([Ctrl, Shift], "W", TabClose); + bind!([Ctrl, Shift], "R", TabRename); bind!([Ctrl], ",", Settings); bind!([], "F11", ToggleFullscreen); diff --git a/src/terminal.rs b/src/terminal.rs index 81b9f50..ae4f9ca 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -198,11 +198,12 @@ impl TerminalPaneGrid { } pub fn unfocus_all_terminals(&self) { for (_pane, tab_model) in self.panes.panes.iter() { - let entity = tab_model.active(); - if let Some(terminal) = tab_model.data::>(entity) { - let mut terminal = terminal.lock().unwrap(); - terminal.is_focused = false; - terminal.update(); + for entity in tab_model.iter() { + if let Some(terminal) = tab_model.data::>(entity) { + let mut terminal = terminal.lock().unwrap(); + terminal.is_focused = false; + terminal.update(); + } } } }