From 8ad3e0cb0cdbb3d7e78785deb9ca405e0945f845 Mon Sep 17 00:00:00 2001 From: kaedwen Date: Sat, 11 Nov 2023 20:52:36 +0100 Subject: [PATCH 1/5] update smithay_client_toolkit --- Cargo.lock | 863 +++++++++++++++++-------- Cargo.toml | 9 +- src/app.rs | 263 ++++---- src/command.rs | 294 ++++----- src/config.rs | 319 ++++----- src/main.rs | 13 +- src/menu.rs | 269 ++++++++ src/renderer.rs | 1642 +++++++++++++++++++++++------------------------ 8 files changed, 2148 insertions(+), 1524 deletions(-) create mode 100644 src/menu.rs diff --git a/Cargo.lock b/Cargo.lock index 39691e9..5968115 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,31 +3,31 @@ version = 3 [[package]] -name = "adler32" -version = "1.2.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.53" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arrayvec" -version = "0.5.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "atty" @@ -52,33 +52,72 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "calloop" -version = "0.9.3" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ + "bitflags 2.4.1", "log", - "nix", + "polling", + "rustix", + "slab", + "thiserror", ] [[package]] -name = "cc" -version = "1.0.72" +name = "calloop-wayland-source" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", +] [[package]] -name = "cfg-if" -version = "0.1.10" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -88,16 +127,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "3.1.0" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f1fea81f183005ced9e59cdb01737ef2423956dac5a6d731b06b2ecfaa3467" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", + "clap_lex", "indexmap", - "lazy_static", - "os_str_bytes", + "once_cell", "strsim", "termcolor", "textwrap", @@ -105,31 +144,55 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.0" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", ] [[package]] name = "cmake" -version = "0.1.48" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] +[[package]] +name = "concurrent-queue" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-cstr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3d0b5ff30645a68f35ece8cea4556ca14ef8a1651455f789a099a0513532a6" + [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -137,27 +200,39 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" -version = "0.19.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", + "core-graphics-types", "foreign-types", "libc", ] +[[package]] +name = "core-graphics-types" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + [[package]] name = "core-text" -version = "15.0.0" +version = "19.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" dependencies = [ "core-foundation", "core-graphics", @@ -171,28 +246,23 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "deflate" -version = "0.7.20" +name = "crossbeam-utils" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "adler32", - "byteorder", + "cfg-if", ] [[package]] -name = "dirs" -version = "2.0.2" +name = "cursor-icon" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" -dependencies = [ - "cfg-if 0.1.10", - "dirs-sys", -] +checksum = "740bb192a8e2d1350119916954f4409ee7f62f149b536911eeb78ba5a20526bf" [[package]] name = "dirs" @@ -203,11 +273,32 @@ dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", @@ -216,9 +307,9 @@ dependencies = [ [[package]] name = "dlib" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ "libloading", ] @@ -254,23 +345,42 @@ dependencies = [ "termcolor", ] +[[package]] +name = "errno" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "euclid" -version = "0.20.14" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad" +checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787" dependencies = [ "num-traits", ] [[package]] -name = "expat-sys" -version = "2.1.6" +name = "fdeflate" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" dependencies = [ - "cmake", - "pkg-config", + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", ] [[package]] @@ -281,16 +391,16 @@ checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" [[package]] name = "font-kit" -version = "0.7.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ab2cdc792b545c49acb23aafa1cdc9381ea96140741f10bac596fd1bd1aa4f" +checksum = "21fe28504d371085fae9ac7a3450f0b289ab71e07c8e57baa3fb68b9e57d6ce5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "core-foundation", "core-graphics", "core-text", - "dirs 2.0.2", + "dirs-next", "dwrote", "float-ord", "freetype", @@ -299,9 +409,9 @@ dependencies = [ "log", "pathfinder_geometry", "pathfinder_simd", - "servo-fontconfig", "walkdir", "winapi", + "yeslogic-fontconfig-sys", ] [[package]] @@ -321,36 +431,47 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "freetype" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028" +checksum = "bee38378a9e3db1cc693b4f88d166ae375338a0ff75cb8263e1c601d51f35dc6" dependencies = [ + "freetype-sys", "libc", - "servo-freetype-sys", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", ] [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi", ] [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -369,23 +490,14 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "indexmap" -version = "1.8.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", ] -[[package]] -name = "inflate" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" -dependencies = [ - "adler32", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -394,40 +506,49 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.117" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ - "cfg-if 1.0.0", - "winapi", + "cfg-if", + "windows-sys", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "log" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lyon_geom" -version = "0.15.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9962a2ba81382716b87d7d358493cb71844c1f9165ddad763cd9f4d3f5474df2" +checksum = "74df1ff0a0147282eb10699537a03baa7d31972b58984a1d44ce0624043fe8ad" dependencies = [ "arrayvec", "euclid", @@ -436,24 +557,33 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memmap2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +dependencies = [ + "libc", +] [[package]] name = "memmap2" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] @@ -464,53 +594,59 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", + "simd-adler32", +] + [[package]] name = "nix" -version = "0.22.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ - "bitflags", - "cc", - "cfg-if 1.0.0", + "bitflags 1.3.2", + "cfg-if", "libc", "memoffset", ] [[package]] name = "nom" -version = "7.1.0" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", - "version_check", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] name = "once_cell" -version = "1.9.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" -dependencies = [ - "memchr", -] +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "pathfinder_geometry" @@ -524,38 +660,50 @@ dependencies = [ [[package]] name = "pathfinder_simd" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39fe46acc5503595e5949c17b818714d26fdf9b4920eacf3b2947f0199f4a6ff" +checksum = "0444332826c70dc47be74a7c6a5fc44e23a7905ad6858d4162b658320455ef93" dependencies = [ "rustc_version", ] [[package]] -name = "pest" -version = "2.1.3" +name = "pin-project-lite" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pkg-config" -version = "0.3.24" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "png" -version = "0.15.3" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", - "deflate", - "inflate", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62a79e457c9898100b4298d57d69ec53d06f9a6ed352431ce5f377e082d2e846" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys", ] [[package]] @@ -567,7 +715,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -584,27 +732,36 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ - "unicode-xid", + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", ] [[package]] name = "quote" -version = "1.0.15" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] [[package]] name = "raqote" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501c19caa439857ed7bea975fa4c3c10ee9a24e33c2640030c3ac14b58f39f77" +checksum = "48bbdc1825eea658de94084241b12bffb214f0bd3bac9a442a405a384e2a042b" dependencies = [ "euclid", "font-kit", @@ -617,28 +774,41 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", "redox_syscall", + "thiserror", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -647,9 +817,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rmenu" @@ -657,7 +827,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "dirs 4.0.0", + "dirs", "env_logger", "font-kit", "log", @@ -668,22 +838,36 @@ dependencies = [ "serde_yaml", "smithay-client-toolkit", "wayland-client", + "wayland-protocols-wlr", ] [[package]] name = "rustc_version" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -696,53 +880,41 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.38", ] [[package]] name = "serde_yaml" -version = "0.8.23" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ "indexmap", "ryu", @@ -751,59 +923,52 @@ dependencies = [ ] [[package]] -name = "servo-fontconfig" -version = "0.4.0" +name = "simd-adler32" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] -name = "servo-fontconfig-sys" -version = "4.0.6" +name = "slab" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0aa080856db55f188aaf36f01cae8c03448a6056552adb77d461179e44e1a14" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "expat-sys", - "pkg-config", - "servo-freetype-sys", -] - -[[package]] -name = "servo-freetype-sys" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9232032c2e85118c0282c6562c84cab12316e655491ba0a5d1905b2320060d1b" -dependencies = [ - "cmake", - "pkg-config", + "autocfg", ] [[package]] name = "smallvec" -version = "1.8.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "smithay-client-toolkit" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1325f292209cee78d5035530932422a30aa4c8fda1a16593ac083c1de211e68a" +checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f" dependencies = [ - "bitflags", + "bitflags 2.4.1", + "bytemuck", "calloop", - "dlib", - "lazy_static", + "calloop-wayland-source", + "cursor-icon", + "libc", "log", - "memmap2", - "nix", + "memmap2 0.9.0", "pkg-config", + "rustix", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", "wayland-cursor", "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkbcommon", + "xkeysym", ] [[package]] @@ -814,53 +979,94 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "sw-composite" -version = "0.7.14" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac8fb7895b4afa060ad731a32860db8755da3449a47e796d5ecf758db2671d4" + +[[package]] +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e39674047b1748e8bf4865142772a6637bd32d8b4b27e3c2248dd122f637808b" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "syn" -version = "1.0.86" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "termcolor" -version = "1.1.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] -name = "typed-arena" -version = "2.0.1" +name = "thiserror" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +dependencies = [ + "thiserror-impl", +] [[package]] -name = "ucd-trie" -version = "0.1.3" +name = "thiserror-impl" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + +[[package]] +name = "typed-arena" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" @@ -870,54 +1076,62 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wayland-client" -version = "0.29.4" +name = "wayland-backend" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" dependencies = [ - "bitflags", + "cc", "downcast-rs", - "libc", "nix", "scoped-tls", - "wayland-commons", - "wayland-scanner", + "smallvec", "wayland-sys", ] [[package]] -name = "wayland-commons" -version = "0.29.4" +name = "wayland-client" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" dependencies = [ + "bitflags 2.4.1", "nix", - "once_cell", - "smallvec", - "wayland-sys", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.4.1", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.4" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" dependencies = [ "nix", "wayland-client", @@ -926,35 +1140,48 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.29.4" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" +dependencies = [ + "bitflags 2.4.1", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags", + "bitflags 2.4.1", + "wayland-backend", "wayland-client", - "wayland-commons", + "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.29.4" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" dependencies = [ "proc-macro2", + "quick-xml", "quote", - "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.29.4" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", - "lazy_static", + "log", "pkg-config", ] @@ -976,9 +1203,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -989,6 +1216,72 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "wio" version = "0.2.2" @@ -1008,10 +1301,24 @@ dependencies = [ ] [[package]] -name = "xml-rs" -version = "0.8.4" +name = "xkbcommon" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" +dependencies = [ + "libc", + "memmap2 0.8.0", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" +dependencies = [ + "bytemuck", +] [[package]] name = "yaml-rust" @@ -1021,3 +1328,15 @@ checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ "linked-hash-map", ] + +[[package]] +name = "yeslogic-fontconfig-sys" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2bbd69036d397ebbff671b1b8e4d918610c181c5a16073b96f984a38d08c386" +dependencies = [ + "const-cstr", + "dlib", + "once_cell", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 6c3a799..dfe9568 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,15 +8,16 @@ license-file = "LICENSE" [dependencies] dirs = "4" -font-kit = "0.7" +font-kit = "0.11" serde = { version = "1.0", features = ["derive"] } clap = { version = "3.1", features = ["derive"] } pathfinder_geometry = "0.5" -smithay-client-toolkit = "0.15" -wayland-client = "0.29" +smithay-client-toolkit = "0.18" +wayland-client = "0.31.1" env_logger = "0.8" serde_yaml = "0.8" regex = "1.5" anyhow = "1.0" raqote = "0.8" -log = "0.4" \ No newline at end of file +log = "0.4" +wayland-protocols-wlr = "0.2.0" diff --git a/src/app.rs b/src/app.rs index 12731d1..91f2d52 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,133 +1,164 @@ +use std::time::Duration; + use log::info; + use smithay_client_toolkit::{ - default_environment, - environment::SimpleGlobal, - new_default_environment, - reexports::{ - calloop::{EventLoop, LoopHandle}, - protocols::wlr::unstable::layer_shell::v1::client::zwlr_layer_shell_v1, - }, - WaylandSource, seat::keyboard::ModifiersState, + compositor::CompositorState, + reexports::{calloop::EventLoop, calloop_wayland_source::WaylandSource}, + seat, + shell::{ + wlr_layer::{Anchor, KeyboardInteractivity, Layer, LayerShell}, + WaylandSurface, + }, }; -use std::{ - cell::{Cell, RefCell}, - time::Duration, -}; -use std::{ - ops::{Deref, DerefMut}, - rc::Rc, -}; +use wayland_client::{globals::registry_queue_init, Connection}; -use crate::{config, command, renderer::Renderer}; +use crate::{command, config, menu}; -#[derive(PartialEq, Debug)] -pub enum LoopAction { - Redraw, -} +// #[derive(Debug)] +// pub struct LayerShell { +// wlr_layer_shell: zwlr_layer_shell_v1::ZwlrLayerShellV1, +// } -#[derive(Clone)] -pub struct LoopContext { - pub action: Rc>>, - pub app_context: Rc>, - pub handle: LoopHandle<'static, LoopContext>, -} +// #[derive(PartialEq, Debug)] +// pub enum LoopAction { +// Redraw, +// } + +// #[derive(Clone)] +// pub struct LoopContext { +// pub action: Rc>>, +// pub app_context: Rc>, +// pub handle: LoopHandle<'static, LoopContext>, +// } pub struct Filter(pub String); pub struct AppContext { - pub input: Filter, - pub list: command::CommandList, - pub app_config: config::AppConfig, - pub current_index: usize, - pub modifiers: ModifiersState, -} - -pub struct App { - event_loop: EventLoop<'static, LoopContext>, -} - -impl Deref for Filter { - type Target = String; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl DerefMut for Filter { - fn deref_mut(&mut self) -> &mut String { - &mut self.0 - } -} - -impl LoopContext { - fn new(handle: LoopHandle<'static, LoopContext>, app_context: AppContext) -> Self { - Self { - action: Rc::new(Cell::new(None)), - app_context: Rc::new(RefCell::new(app_context)), - handle, - } - } + pub input: Filter, + pub list: command::CommandList, + pub app_config: config::AppConfig, + pub current_index: usize, + pub modifiers: seat::keyboard::Modifiers, } -impl AppContext { - pub fn target(&self) -> Option<&command::Command> { - self.list.filtered.get(self.current_index) - } - pub fn filter(&mut self) { - self.list.filter(&self.input, &self.app_config.history); - info!("{}", self.list); - } -} - -default_environment!(RMenuEnv, - fields = [ - layer_shell: SimpleGlobal, - ], - singles = [ - zwlr_layer_shell_v1::ZwlrLayerShellV1 => layer_shell - ], -); +pub struct App {} + +// impl Deref for Filter { +// type Target = String; + +// fn deref(&self) -> &Self::Target { +// &self.0 +// } +// } + +// impl DerefMut for Filter { +// fn deref_mut(&mut self) -> &mut String { +// &mut self.0 +// } +// } + +// impl LoopContext { +// fn new(handle: LoopHandle<'static, LoopContext>, app_context: AppContext) -> Self { +// Self { +// action: Rc::new(Cell::new(None)), +// app_context: Rc::new(RefCell::new(app_context)), +// handle, +// } +// } +// } + +// impl AppContext { +// pub fn target(&self) -> Option<&command::Command> { +// self.list.filtered.get(self.current_index) +// } +// pub fn filter(&mut self) { +// self.list.filter(&self.input, &self.app_config.history); +// info!("{}", self.list); +// } +// } + +// default_environment!(RMenuEnv, +// fields = [ +// layer_shell: SimpleGlobal, +// ], +// singles = [ +// zwlr_layer_shell_v1::ZwlrLayerShellV1 => layer_shell +// ], +// ); impl App { - pub fn new() -> std::io::Result { - let event_loop = EventLoop::::try_new()?; - - - Ok(App { event_loop }) - } - pub fn run(&mut self, app_config: config::AppConfig) -> std::io::Result<()> { - - info!("Config {:?}", app_config); - - let (env, display, queue) = - new_default_environment!(RMenuEnv, fields = [layer_shell: SimpleGlobal::new(),]) - .expect("Initial roundtrip failed!"); - - let app_context = AppContext { - input: Filter(String::new()), - list: command::CommandList::new(&app_config)?, - modifiers: Default::default(), - current_index: 0, - app_config, - }; - - info!("{}", app_context.list); - - WaylandSource::new(queue).quick_insert(self.event_loop.handle())?; - - // create our loop context - let mut loop_context = LoopContext::new(self.event_loop.handle(), app_context); - - let renderer = Renderer::new(env, loop_context.clone()); - - loop { - renderer.handle_events(loop_context.action.take() == Some(LoopAction::Redraw)); - - display.flush().unwrap(); - self.event_loop - .dispatch(Duration::from_millis(100), &mut loop_context)?; - } + pub fn new() -> App { + App {} + } + pub fn run(&mut self, app_config: config::AppConfig) -> anyhow::Result<()> { + info!("Config {:?}", app_config); + + // All Wayland apps start by connecting the compositor (server). + let conn = Connection::connect_to_env().expect("Failed to connect to compositor"); + + // Enumerate the list of globals to get the protocols the server implements. + let (globals, event_queue) = registry_queue_init(&conn).expect("Failed to initialize queue"); + let queue_handle = event_queue.handle(); + + let mut event_loop: EventLoop = + EventLoop::try_new().expect("Failed to initialize the event loop!"); + WaylandSource::new(conn.clone(), event_queue).insert(event_loop.handle())?; + + // The compositor (not to be confused with the server which is commonly called the compositor) allows + // configuring surfaces to be presented. + let compositor = + CompositorState::bind(&globals, &queue_handle).expect("wl_compositor is not available"); + + // This app uses the wlr layer shell, which may not be available with every compositor. + let layer_shell = + LayerShell::bind(&globals, &queue_handle).expect("layer shell is not available"); + + // A layer surface is created from a surface. + let surface = compositor.create_surface(&queue_handle); + + // And then we create the layer shell. + let layer = layer_shell.create_layer_surface( + &queue_handle, + surface, + Layer::Top, + Some("menu_layer"), + None, + ); + + // Configure the layer surface, providing things like the anchor on screen, desired size and the keyboard + // interactivity + layer.set_anchor(Anchor::TOP); + layer.set_keyboard_interactivity(KeyboardInteractivity::OnDemand); + layer.set_size(256, 256); + + // In order for the layer surface to be mapped, we need to perform an initial commit with no attached\ + // buffer. For more info, see WaylandSurface::commit + // + // The compositor will respond with an initial configure that we can then use to present to the layer + // surface with the correct options. + layer.commit(); + + let mut menu_shell = menu::Shell::new(globals, queue_handle); + + let app_context = AppContext { + input: Filter(String::new()), + list: command::CommandList::new(&app_config)?, + modifiers: Default::default(), + current_index: 0, + app_config, + }; + + info!("{}", app_context.list); + + // We don't draw immediately, the configure will notify us when to first draw. + loop { + event_loop.dispatch(Duration::from_millis(16), &mut menu_shell)?; + + if menu_shell.about_to_exit() { + return Ok(()); + } } + } } diff --git a/src/command.rs b/src/command.rs index 2bc83b0..ac9af15 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1,182 +1,184 @@ use std::{ - fmt::Display, - io::Result, - path::{Path, PathBuf}, - process::Stdio, + fmt::Display, + io::Result, + path::{Path, PathBuf}, + process::Stdio, }; use crate::config; -use log::{trace, debug, error, info}; +use log::{debug, error, info, trace}; use std::os::unix::fs::PermissionsExt; #[derive(Clone)] pub struct Command { - pub path: PathBuf, - pub name: String, - weight: u32, + pub path: PathBuf, + pub name: String, + weight: u32, } pub struct CommandList { - initial: Vec, - pub filtered: Vec, + initial: Vec, + pub filtered: Vec, } impl CommandList { - pub fn new(app_config: &config::AppConfig) -> std::io::Result { - let initial = gather_commands(&app_config.config)?; - let filtered = Self::filter_data(None::<&String>, &initial, &app_config.history); - - Ok(Self { initial, filtered }) - } - pub fn filter(&mut self, filter: &String, history: &config::History) { - self.filtered = Self::filter_data(Some(filter), &self.initial, history) - } - pub fn filtered_len(&self) -> usize { - self.filtered.len() - } - fn filename(path: &Path) -> Option { - path.file_name() - .and_then(|s| s.to_str()) - .map(|s| String::from(s)) - } - fn filter_data( - filter: Option<&String>, - data: &Vec, - history: &config::History, - ) -> Vec { - let mut list = data - .iter() - .filter_map(|path| { - Self::filename(path).and_then(|name| { - if let Some(filter) = filter { - Some(name) - .filter(|name| name.to_lowercase().starts_with(filter)) - .map(|name| Command { - path: path.clone(), - weight: history.get_weight(&name), - name, - }) - } else { - Some(Command { - path: path.clone(), - weight: history.get_weight(&name), - name, - }) - } - }) + pub fn new(app_config: &config::AppConfig) -> std::io::Result { + let initial = gather_commands(&app_config.config)?; + let filtered = Self::filter_data(None::<&String>, &initial, &app_config.history); + + Ok(Self { initial, filtered }) + } + pub fn filter(&mut self, filter: &String, history: &config::History) { + self.filtered = Self::filter_data(Some(filter), &self.initial, history) + } + pub fn filtered_len(&self) -> usize { + self.filtered.len() + } + fn filename(path: &Path) -> Option { + path + .file_name() + .and_then(|s| s.to_str()) + .map(|s| String::from(s)) + } + fn filter_data( + filter: Option<&String>, + data: &Vec, + history: &config::History, + ) -> Vec { + let mut list = data + .iter() + .filter_map(|path| { + Self::filename(path).and_then(|name| { + if let Some(filter) = filter { + Some(name) + .filter(|name| name.to_lowercase().starts_with(filter)) + .map(|name| Command { + path: path.clone(), + weight: history.get_weight(&name), + name, + }) + } else { + Some(Command { + path: path.clone(), + weight: history.get_weight(&name), + name, }) - .collect::>(); + } + }) + }) + .collect::>(); - // sort the weights - list.sort_by(|a, b| b.weight.cmp(&a.weight)); + // sort the weights + list.sort_by(|a, b| b.weight.cmp(&a.weight)); - list - } + list + } } impl Display for CommandList { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "List has {} filtered entries and {} in total", - self.filtered.len(), - self.initial.len() - ) - } + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "List has {} filtered entries and {} in total", + self.filtered.len(), + self.initial.len() + ) + } } impl Display for Command { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.path.display()) - } + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.path.display()) + } } impl Command { - pub fn binary(&self) -> String { - String::from( - self.path - .file_name() - .and_then(|n| n.to_str()) - .expect("Binary string to be converted"), - ) - } + pub fn binary(&self) -> String { + String::from( + self + .path + .file_name() + .and_then(|n| n.to_str()) + .expect("Binary string to be converted"), + ) + } } fn gather_commands(config: &config::Config) -> std::io::Result> { - let mut list = Vec::::new(); - - if let Ok(path) = std::env::var("PATH") { - for p in path.split(":") { - let target = Path::new(p); - if target.is_dir() { - debug!("Inspect PATH {}", p); - list.extend( - std::fs::read_dir(target)? - .filter_map(Result::ok) - .filter(|i| { - // filter out not executable - i.metadata() - .map_or_else(|_| false, |m| m.permissions().mode() & 0o111 != 0) - }) - .filter_map(|i| { - i.file_name().into_string().ok().and_then(|name| { - // filter out whitelisted binaries - let w = if let Some(list) = config.whitelist.as_ref() { - if list.contains(&name) { - // whitelist contains -> allow - Some(i.path()) - } else { - // whitelist does not contain -> hide - None - } - } else { - // no whitelist given -> allow - Some(i.path()) - }; - - trace!("WHITE {} - {:?}", name, w); - - // filter out blacklisted binaries - let b = if let Some(list) = config.blacklist.as_ref() { - if list.contains(&name) { - // blacklist contains -> hide - None - } else { - // blacklist does not contain -> allow - Some(i.path()) - } - } else { - // no backlist given -> allow - Some(i.path()) - }; - - trace!("BLACK {} - {:?}", name, b); - - w.and(b) - }) - }), - ); - } - } + let mut list = Vec::::new(); + + if let Ok(path) = std::env::var("PATH") { + for p in path.split(":") { + let target = Path::new(p); + if target.is_dir() { + debug!("Inspect PATH {}", p); + list.extend( + std::fs::read_dir(target)? + .filter_map(Result::ok) + .filter(|i| { + // filter out not executable + i.metadata() + .map_or_else(|_| false, |m| m.permissions().mode() & 0o111 != 0) + }) + .filter_map(|i| { + i.file_name().into_string().ok().and_then(|name| { + // filter out whitelisted binaries + let w = if let Some(list) = config.whitelist.as_ref() { + if list.contains(&name) { + // whitelist contains -> allow + Some(i.path()) + } else { + // whitelist does not contain -> hide + None + } + } else { + // no whitelist given -> allow + Some(i.path()) + }; + + trace!("WHITE {} - {:?}", name, w); + + // filter out blacklisted binaries + let b = if let Some(list) = config.blacklist.as_ref() { + if list.contains(&name) { + // blacklist contains -> hide + None + } else { + // blacklist does not contain -> allow + Some(i.path()) + } + } else { + // no backlist given -> allow + Some(i.path()) + }; + + trace!("BLACK {} - {:?}", name, b); + + w.and(b) + }) + }), + ); + } } + } - Ok(list) + Ok(list) } pub fn launch(command: &Command) -> i32 { - match std::process::Command::new(&command.path) - .stdout(Stdio::null()) - .stdin(Stdio::null()) - .stderr(Stdio::null()) - .spawn() - { - Ok(_) => { - info!("Successfully spawned {}", command); - 0 - } - Err(e) => { - error!("Failed to spawn {} - {}", command, e); - 1 - } + match std::process::Command::new(&command.path) + .stdout(Stdio::null()) + .stdin(Stdio::null()) + .stderr(Stdio::null()) + .spawn() + { + Ok(_) => { + info!("Successfully spawned {}", command); + 0 + } + Err(e) => { + error!("Failed to spawn {} - {}", command, e); + 1 } + } } diff --git a/src/config.rs b/src/config.rs index 2decc31..508a4dc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,34 +9,34 @@ use std::path::{Path, PathBuf}; #[derive(Debug, Clone, Copy, Default)] pub struct Color { - pub r: u8, - pub g: u8, - pub b: u8, - pub a: u8, + pub r: u8, + pub g: u8, + pub b: u8, + pub a: u8, } #[derive(Debug, Default, Deserialize)] pub struct Style { - pub highlight_color: Option, - pub foreground_color: Option, - pub background_color: Option, - pub height: u32, + pub highlight_color: Option, + pub foreground_color: Option, + pub background_color: Option, + pub height: u32, } #[derive(Debug, Default, Deserialize)] pub struct Font { - pub path: Option, - pub name: Option, - pub spacing: Option, - pub size: Option, + pub path: Option, + pub name: Option, + pub spacing: Option, + pub size: Option, } #[derive(Debug, Default, Deserialize)] pub struct Config { - pub blacklist: Option>, - pub whitelist: Option>, - pub style: Option