├── .github └── workflows │ ├── docker-image.yml │ ├── publish-docker-image.yml │ └── rust.yml ├── Cargo.lock ├── Cargo.toml ├── README.md ├── assets └── vmux.png ├── doc ├── NeovimConf │ ├── README.md │ ├── clean_bash │ ├── conf │ │ ├── hooks │ │ │ ├── list_sessions_names │ │ │ └── session_name │ │ ├── wallpaper-credits │ │ └── wallpapers │ │ │ └── NeovimConf.png │ ├── data.yml │ ├── demo_server_mode │ ├── diss │ ├── img │ │ ├── .gitignore │ │ └── vmux.png │ ├── long_lines_limit │ ├── presentation.yml │ ├── render_img │ ├── run │ ├── run_asciinema │ ├── skim_demo │ ├── start-term │ ├── terminal_text_to_copy │ ├── tomd │ └── topdf ├── asciinema.cast ├── screencast.png ├── tags └── vmux.txt ├── docker ├── Dockerfile ├── init.vim ├── list_sessions_names ├── session_name └── setup-alpine.sh ├── plugin ├── e ├── le ├── lsplit ├── re ├── rsplit ├── setup_vmux.sh ├── split ├── tabnew ├── vmux ├── vmux-editor ├── vmux.vim ├── vmux_send ├── vmux_send_cmd ├── vmux_send_winc_l ├── vmux_send_winc_t └── vsplit └── src └── main.rs /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Docker Image CI 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Build the Docker image 18 | run: docker build docker --tag vmux:$(date +%s) 19 | -------------------------------------------------------------------------------- /.github/workflows/publish-docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker image 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | push_to_registry: 9 | name: Push Docker image to Docker Hub 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Check out the repo 13 | uses: actions/checkout@v3 14 | 15 | - name: Log in to Docker Hub 16 | uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 17 | with: 18 | username: yazgoo 19 | password: ${{ secrets.DOCKER_PASSWORD }} 20 | 21 | - name: Extract metadata (tags, labels) for Docker 22 | id: meta 23 | uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 24 | with: 25 | images: yazgoo/vmux 26 | 27 | - name: Build and push Docker image 28 | uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc 29 | with: 30 | context: docker 31 | push: true 32 | tags: ${{ steps.meta.outputs.tags }} 33 | labels: ${{ steps.meta.outputs.labels }} 34 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Clippy 20 | run: cargo clippy 21 | - name: Build 22 | run: cargo build --verbose 23 | - name: Run tests 24 | run: cargo test --verbose 25 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.21.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "1.1.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "android-tzdata" 31 | version = "0.1.1" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 34 | 35 | [[package]] 36 | name = "android_system_properties" 37 | version = "0.1.5" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 40 | dependencies = [ 41 | "libc", 42 | ] 43 | 44 | [[package]] 45 | name = "anstream" 46 | version = "0.6.7" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4cd2405b3ac1faab2990b74d728624cd9fd115651fcecc7c2d8daf01376275ba" 49 | dependencies = [ 50 | "anstyle", 51 | "anstyle-parse", 52 | "anstyle-query", 53 | "anstyle-wincon", 54 | "colorchoice", 55 | "utf8parse", 56 | ] 57 | 58 | [[package]] 59 | name = "anstyle" 60 | version = "1.0.4" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" 63 | 64 | [[package]] 65 | name = "anstyle-parse" 66 | version = "0.2.3" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" 69 | dependencies = [ 70 | "utf8parse", 71 | ] 72 | 73 | [[package]] 74 | name = "anstyle-query" 75 | version = "1.0.2" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" 78 | dependencies = [ 79 | "windows-sys 0.52.0", 80 | ] 81 | 82 | [[package]] 83 | name = "anstyle-wincon" 84 | version = "3.0.2" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" 87 | dependencies = [ 88 | "anstyle", 89 | "windows-sys 0.52.0", 90 | ] 91 | 92 | [[package]] 93 | name = "anyhow" 94 | version = "1.0.79" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" 97 | 98 | [[package]] 99 | name = "arrayvec" 100 | version = "0.7.4" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 103 | 104 | [[package]] 105 | name = "async-trait" 106 | version = "0.1.77" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" 109 | dependencies = [ 110 | "proc-macro2", 111 | "quote", 112 | "syn 2.0.48", 113 | ] 114 | 115 | [[package]] 116 | name = "atty" 117 | version = "0.2.14" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 120 | dependencies = [ 121 | "hermit-abi 0.1.19", 122 | "libc", 123 | "winapi 0.3.9", 124 | ] 125 | 126 | [[package]] 127 | name = "autocfg" 128 | version = "1.1.0" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 131 | 132 | [[package]] 133 | name = "backtrace" 134 | version = "0.3.69" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" 137 | dependencies = [ 138 | "addr2line", 139 | "cc", 140 | "cfg-if", 141 | "libc", 142 | "miniz_oxide", 143 | "object", 144 | "rustc-demangle", 145 | ] 146 | 147 | [[package]] 148 | name = "baus" 149 | version = "0.2.0" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "42d2f97a48dcf8b092d1bfed8757fe6207fefd85d68e434d040d43d06aadbfa4" 152 | dependencies = [ 153 | "clap 3.2.25", 154 | "dirs", 155 | "miniserde", 156 | ] 157 | 158 | [[package]] 159 | name = "beef" 160 | version = "0.5.2" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" 163 | 164 | [[package]] 165 | name = "bincode" 166 | version = "1.3.3" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 169 | dependencies = [ 170 | "serde", 171 | ] 172 | 173 | [[package]] 174 | name = "bit_field" 175 | version = "0.10.2" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" 178 | 179 | [[package]] 180 | name = "bitflags" 181 | version = "1.3.2" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 184 | 185 | [[package]] 186 | name = "bitflags" 187 | version = "2.4.1" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 190 | 191 | [[package]] 192 | name = "block-buffer" 193 | version = "0.10.4" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 196 | dependencies = [ 197 | "generic-array", 198 | ] 199 | 200 | [[package]] 201 | name = "blockish" 202 | version = "0.1.3" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "7548160efef4230dd3122e4d6bb99f5308373ea056fb2be46a254c40ca97ea39" 205 | dependencies = [ 206 | "clap 4.4.17", 207 | "image", 208 | "lazy_static", 209 | "num_cpus", 210 | "scoped_threadpool", 211 | "term_size", 212 | ] 213 | 214 | [[package]] 215 | name = "boxfnonce" 216 | version = "0.1.1" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "5988cb1d626264ac94100be357308f29ff7cbdd3b36bda27f450a4ee3f713426" 219 | 220 | [[package]] 221 | name = "bumpalo" 222 | version = "3.14.0" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" 225 | 226 | [[package]] 227 | name = "bytemuck" 228 | version = "1.14.0" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" 231 | 232 | [[package]] 233 | name = "byteorder" 234 | version = "1.5.0" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 237 | 238 | [[package]] 239 | name = "bytes" 240 | version = "0.4.12" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" 243 | dependencies = [ 244 | "byteorder", 245 | "iovec", 246 | ] 247 | 248 | [[package]] 249 | name = "bytes" 250 | version = "1.5.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 253 | 254 | [[package]] 255 | name = "cc" 256 | version = "1.0.83" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 259 | dependencies = [ 260 | "libc", 261 | ] 262 | 263 | [[package]] 264 | name = "cfg-if" 265 | version = "1.0.0" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 268 | 269 | [[package]] 270 | name = "chrono" 271 | version = "0.4.31" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" 274 | dependencies = [ 275 | "android-tzdata", 276 | "iana-time-zone", 277 | "js-sys", 278 | "num-traits", 279 | "wasm-bindgen", 280 | "windows-targets 0.48.5", 281 | ] 282 | 283 | [[package]] 284 | name = "clap" 285 | version = "3.2.25" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" 288 | dependencies = [ 289 | "atty", 290 | "bitflags 1.3.2", 291 | "clap_derive 3.2.25", 292 | "clap_lex 0.2.4", 293 | "indexmap", 294 | "once_cell", 295 | "strsim 0.10.0", 296 | "termcolor", 297 | "textwrap", 298 | ] 299 | 300 | [[package]] 301 | name = "clap" 302 | version = "4.4.17" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "80932e03c33999b9235edb8655bc9df3204adc9887c2f95b50cb1deb9fd54253" 305 | dependencies = [ 306 | "clap_builder", 307 | "clap_derive 4.4.7", 308 | ] 309 | 310 | [[package]] 311 | name = "clap_builder" 312 | version = "4.4.17" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "d6c0db58c659eef1c73e444d298c27322a1b52f6927d2ad470c0c0f96fa7b8fa" 315 | dependencies = [ 316 | "anstream", 317 | "anstyle", 318 | "clap_lex 0.6.0", 319 | "strsim 0.10.0", 320 | ] 321 | 322 | [[package]] 323 | name = "clap_derive" 324 | version = "3.2.25" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" 327 | dependencies = [ 328 | "heck", 329 | "proc-macro-error", 330 | "proc-macro2", 331 | "quote", 332 | "syn 1.0.109", 333 | ] 334 | 335 | [[package]] 336 | name = "clap_derive" 337 | version = "4.4.7" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" 340 | dependencies = [ 341 | "heck", 342 | "proc-macro2", 343 | "quote", 344 | "syn 2.0.48", 345 | ] 346 | 347 | [[package]] 348 | name = "clap_lex" 349 | version = "0.2.4" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" 352 | dependencies = [ 353 | "os_str_bytes", 354 | ] 355 | 356 | [[package]] 357 | name = "clap_lex" 358 | version = "0.6.0" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" 361 | 362 | [[package]] 363 | name = "clipboard-win" 364 | version = "4.5.0" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" 367 | dependencies = [ 368 | "error-code", 369 | "str-buf", 370 | "winapi 0.3.9", 371 | ] 372 | 373 | [[package]] 374 | name = "color_quant" 375 | version = "1.1.0" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 378 | 379 | [[package]] 380 | name = "colorchoice" 381 | version = "1.0.0" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" 384 | 385 | [[package]] 386 | name = "core-foundation-sys" 387 | version = "0.8.6" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 390 | 391 | [[package]] 392 | name = "cpufeatures" 393 | version = "0.2.12" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 396 | dependencies = [ 397 | "libc", 398 | ] 399 | 400 | [[package]] 401 | name = "crc32fast" 402 | version = "1.3.2" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 405 | dependencies = [ 406 | "cfg-if", 407 | ] 408 | 409 | [[package]] 410 | name = "crossbeam" 411 | version = "0.8.4" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" 414 | dependencies = [ 415 | "crossbeam-channel", 416 | "crossbeam-deque", 417 | "crossbeam-epoch", 418 | "crossbeam-queue", 419 | "crossbeam-utils", 420 | ] 421 | 422 | [[package]] 423 | name = "crossbeam-channel" 424 | version = "0.5.11" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" 427 | dependencies = [ 428 | "crossbeam-utils", 429 | ] 430 | 431 | [[package]] 432 | name = "crossbeam-deque" 433 | version = "0.8.5" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 436 | dependencies = [ 437 | "crossbeam-epoch", 438 | "crossbeam-utils", 439 | ] 440 | 441 | [[package]] 442 | name = "crossbeam-epoch" 443 | version = "0.9.18" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 446 | dependencies = [ 447 | "crossbeam-utils", 448 | ] 449 | 450 | [[package]] 451 | name = "crossbeam-queue" 452 | version = "0.3.11" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" 455 | dependencies = [ 456 | "crossbeam-utils", 457 | ] 458 | 459 | [[package]] 460 | name = "crossbeam-utils" 461 | version = "0.8.19" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 464 | 465 | [[package]] 466 | name = "crunchy" 467 | version = "0.2.2" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 470 | 471 | [[package]] 472 | name = "crypto-common" 473 | version = "0.1.6" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 476 | dependencies = [ 477 | "generic-array", 478 | "typenum", 479 | ] 480 | 481 | [[package]] 482 | name = "daemonize" 483 | version = "0.4.1" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "70c24513e34f53b640819f0ac9f705b673fcf4006d7aab8778bee72ebfc89815" 486 | dependencies = [ 487 | "boxfnonce", 488 | "libc", 489 | ] 490 | 491 | [[package]] 492 | name = "darling" 493 | version = "0.10.2" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" 496 | dependencies = [ 497 | "darling_core 0.10.2", 498 | "darling_macro 0.10.2", 499 | ] 500 | 501 | [[package]] 502 | name = "darling" 503 | version = "0.14.4" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" 506 | dependencies = [ 507 | "darling_core 0.14.4", 508 | "darling_macro 0.14.4", 509 | ] 510 | 511 | [[package]] 512 | name = "darling_core" 513 | version = "0.10.2" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" 516 | dependencies = [ 517 | "fnv", 518 | "ident_case", 519 | "proc-macro2", 520 | "quote", 521 | "strsim 0.9.3", 522 | "syn 1.0.109", 523 | ] 524 | 525 | [[package]] 526 | name = "darling_core" 527 | version = "0.14.4" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" 530 | dependencies = [ 531 | "fnv", 532 | "ident_case", 533 | "proc-macro2", 534 | "quote", 535 | "strsim 0.10.0", 536 | "syn 1.0.109", 537 | ] 538 | 539 | [[package]] 540 | name = "darling_macro" 541 | version = "0.10.2" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" 544 | dependencies = [ 545 | "darling_core 0.10.2", 546 | "quote", 547 | "syn 1.0.109", 548 | ] 549 | 550 | [[package]] 551 | name = "darling_macro" 552 | version = "0.14.4" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" 555 | dependencies = [ 556 | "darling_core 0.14.4", 557 | "quote", 558 | "syn 1.0.109", 559 | ] 560 | 561 | [[package]] 562 | name = "defer-drop" 563 | version = "1.3.0" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "f613ec9fa66a6b28cdb1842b27f9adf24f39f9afc4dcdd9fdecee4aca7945c57" 566 | dependencies = [ 567 | "crossbeam-channel", 568 | "once_cell", 569 | ] 570 | 571 | [[package]] 572 | name = "deranged" 573 | version = "0.3.11" 574 | source = "registry+https://github.com/rust-lang/crates.io-index" 575 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 576 | dependencies = [ 577 | "powerfmt", 578 | ] 579 | 580 | [[package]] 581 | name = "derive_builder" 582 | version = "0.11.2" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" 585 | dependencies = [ 586 | "derive_builder_macro", 587 | ] 588 | 589 | [[package]] 590 | name = "derive_builder_core" 591 | version = "0.11.2" 592 | source = "registry+https://github.com/rust-lang/crates.io-index" 593 | checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" 594 | dependencies = [ 595 | "darling 0.14.4", 596 | "proc-macro2", 597 | "quote", 598 | "syn 1.0.109", 599 | ] 600 | 601 | [[package]] 602 | name = "derive_builder_macro" 603 | version = "0.11.2" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" 606 | dependencies = [ 607 | "derive_builder_core", 608 | "syn 1.0.109", 609 | ] 610 | 611 | [[package]] 612 | name = "digest" 613 | version = "0.10.7" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 616 | dependencies = [ 617 | "block-buffer", 618 | "crypto-common", 619 | ] 620 | 621 | [[package]] 622 | name = "dirs" 623 | version = "4.0.0" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 626 | dependencies = [ 627 | "dirs-sys", 628 | ] 629 | 630 | [[package]] 631 | name = "dirs-next" 632 | version = "2.0.0" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 635 | dependencies = [ 636 | "cfg-if", 637 | "dirs-sys-next", 638 | ] 639 | 640 | [[package]] 641 | name = "dirs-sys" 642 | version = "0.3.7" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 645 | dependencies = [ 646 | "libc", 647 | "redox_users", 648 | "winapi 0.3.9", 649 | ] 650 | 651 | [[package]] 652 | name = "dirs-sys-next" 653 | version = "0.1.2" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 656 | dependencies = [ 657 | "libc", 658 | "redox_users", 659 | "winapi 0.3.9", 660 | ] 661 | 662 | [[package]] 663 | name = "diss" 664 | version = "0.2.10" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "bc082aeb1b5939598593c1aee6d8f06ec15fa1ffc2208e3ba84db4246033de41" 667 | dependencies = [ 668 | "anyhow", 669 | "bincode", 670 | "clap 3.2.25", 671 | "daemonize", 672 | "dirs", 673 | "fern", 674 | "log", 675 | "log-derive", 676 | "nix 0.25.1", 677 | "pty", 678 | "rand 0.8.5", 679 | "serde", 680 | "signal-hook", 681 | "termion", 682 | "timeout-readwrite", 683 | "whoami", 684 | ] 685 | 686 | [[package]] 687 | name = "either" 688 | version = "1.9.0" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 691 | 692 | [[package]] 693 | name = "endian-type" 694 | version = "0.1.2" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" 697 | 698 | [[package]] 699 | name = "env_logger" 700 | version = "0.9.3" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" 703 | dependencies = [ 704 | "atty", 705 | "humantime", 706 | "log", 707 | "regex", 708 | "termcolor", 709 | ] 710 | 711 | [[package]] 712 | name = "errno" 713 | version = "0.1.8" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "1e2b2decb0484e15560df3210cf0d78654bb0864b2c138977c07e377a1bae0e2" 716 | dependencies = [ 717 | "kernel32-sys", 718 | "libc", 719 | "winapi 0.2.8", 720 | ] 721 | 722 | [[package]] 723 | name = "errno" 724 | version = "0.3.8" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 727 | dependencies = [ 728 | "libc", 729 | "windows-sys 0.52.0", 730 | ] 731 | 732 | [[package]] 733 | name = "error-code" 734 | version = "2.3.1" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 737 | dependencies = [ 738 | "libc", 739 | "str-buf", 740 | ] 741 | 742 | [[package]] 743 | name = "exr" 744 | version = "1.71.0" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8" 747 | dependencies = [ 748 | "bit_field", 749 | "flume", 750 | "half", 751 | "lebe", 752 | "miniz_oxide", 753 | "rayon-core", 754 | "smallvec", 755 | "zune-inflate", 756 | ] 757 | 758 | [[package]] 759 | name = "fd-lock" 760 | version = "3.0.13" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" 763 | dependencies = [ 764 | "cfg-if", 765 | "rustix", 766 | "windows-sys 0.48.0", 767 | ] 768 | 769 | [[package]] 770 | name = "fdeflate" 771 | version = "0.3.3" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "209098dd6dfc4445aa6111f0e98653ac323eaa4dfd212c9ca3931bf9955c31bd" 774 | dependencies = [ 775 | "simd-adler32", 776 | ] 777 | 778 | [[package]] 779 | name = "fern" 780 | version = "0.6.2" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" 783 | dependencies = [ 784 | "log", 785 | ] 786 | 787 | [[package]] 788 | name = "flate2" 789 | version = "1.0.28" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" 792 | dependencies = [ 793 | "crc32fast", 794 | "miniz_oxide", 795 | ] 796 | 797 | [[package]] 798 | name = "flume" 799 | version = "0.11.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" 802 | dependencies = [ 803 | "spin", 804 | ] 805 | 806 | [[package]] 807 | name = "fnv" 808 | version = "1.0.7" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 811 | 812 | [[package]] 813 | name = "futures" 814 | version = "0.1.31" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" 817 | 818 | [[package]] 819 | name = "futures" 820 | version = "0.3.30" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" 823 | dependencies = [ 824 | "futures-channel", 825 | "futures-core", 826 | "futures-executor", 827 | "futures-io", 828 | "futures-sink", 829 | "futures-task", 830 | "futures-util", 831 | ] 832 | 833 | [[package]] 834 | name = "futures-channel" 835 | version = "0.3.30" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 838 | dependencies = [ 839 | "futures-core", 840 | "futures-sink", 841 | ] 842 | 843 | [[package]] 844 | name = "futures-core" 845 | version = "0.3.30" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 848 | 849 | [[package]] 850 | name = "futures-executor" 851 | version = "0.3.30" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" 854 | dependencies = [ 855 | "futures-core", 856 | "futures-task", 857 | "futures-util", 858 | ] 859 | 860 | [[package]] 861 | name = "futures-io" 862 | version = "0.3.30" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 865 | 866 | [[package]] 867 | name = "futures-macro" 868 | version = "0.3.30" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" 871 | dependencies = [ 872 | "proc-macro2", 873 | "quote", 874 | "syn 2.0.48", 875 | ] 876 | 877 | [[package]] 878 | name = "futures-sink" 879 | version = "0.3.30" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 882 | 883 | [[package]] 884 | name = "futures-task" 885 | version = "0.3.30" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 888 | 889 | [[package]] 890 | name = "futures-util" 891 | version = "0.3.30" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 894 | dependencies = [ 895 | "futures 0.1.31", 896 | "futures-channel", 897 | "futures-core", 898 | "futures-io", 899 | "futures-macro", 900 | "futures-sink", 901 | "futures-task", 902 | "memchr", 903 | "pin-project-lite", 904 | "pin-utils", 905 | "slab", 906 | "tokio-io", 907 | ] 908 | 909 | [[package]] 910 | name = "fuzzy-matcher" 911 | version = "0.3.7" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" 914 | dependencies = [ 915 | "thread_local", 916 | ] 917 | 918 | [[package]] 919 | name = "generic-array" 920 | version = "0.14.7" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 923 | dependencies = [ 924 | "typenum", 925 | "version_check", 926 | ] 927 | 928 | [[package]] 929 | name = "getrandom" 930 | version = "0.1.16" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 933 | dependencies = [ 934 | "cfg-if", 935 | "libc", 936 | "wasi 0.9.0+wasi-snapshot-preview1", 937 | ] 938 | 939 | [[package]] 940 | name = "getrandom" 941 | version = "0.2.12" 942 | source = "registry+https://github.com/rust-lang/crates.io-index" 943 | checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" 944 | dependencies = [ 945 | "cfg-if", 946 | "libc", 947 | "wasi 0.11.0+wasi-snapshot-preview1", 948 | ] 949 | 950 | [[package]] 951 | name = "gif" 952 | version = "0.12.0" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" 955 | dependencies = [ 956 | "color_quant", 957 | "weezl", 958 | ] 959 | 960 | [[package]] 961 | name = "gimli" 962 | version = "0.28.1" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 965 | 966 | [[package]] 967 | name = "half" 968 | version = "2.2.1" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" 971 | dependencies = [ 972 | "crunchy", 973 | ] 974 | 975 | [[package]] 976 | name = "hashbrown" 977 | version = "0.12.3" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 980 | 981 | [[package]] 982 | name = "heck" 983 | version = "0.4.1" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 986 | 987 | [[package]] 988 | name = "hermit-abi" 989 | version = "0.1.19" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 992 | dependencies = [ 993 | "libc", 994 | ] 995 | 996 | [[package]] 997 | name = "hermit-abi" 998 | version = "0.3.3" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 1001 | 1002 | [[package]] 1003 | name = "humantime" 1004 | version = "2.1.0" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1007 | 1008 | [[package]] 1009 | name = "iana-time-zone" 1010 | version = "0.1.59" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" 1013 | dependencies = [ 1014 | "android_system_properties", 1015 | "core-foundation-sys", 1016 | "iana-time-zone-haiku", 1017 | "js-sys", 1018 | "wasm-bindgen", 1019 | "windows-core", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "iana-time-zone-haiku" 1024 | version = "0.1.2" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 1027 | dependencies = [ 1028 | "cc", 1029 | ] 1030 | 1031 | [[package]] 1032 | name = "ident_case" 1033 | version = "1.0.1" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1036 | 1037 | [[package]] 1038 | name = "image" 1039 | version = "0.24.8" 1040 | source = "registry+https://github.com/rust-lang/crates.io-index" 1041 | checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" 1042 | dependencies = [ 1043 | "bytemuck", 1044 | "byteorder", 1045 | "color_quant", 1046 | "exr", 1047 | "gif", 1048 | "jpeg-decoder", 1049 | "num-traits", 1050 | "png", 1051 | "qoi", 1052 | "tiff", 1053 | ] 1054 | 1055 | [[package]] 1056 | name = "indexmap" 1057 | version = "1.9.3" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 1060 | dependencies = [ 1061 | "autocfg", 1062 | "hashbrown", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "iovec" 1067 | version = "0.1.4" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1070 | dependencies = [ 1071 | "libc", 1072 | ] 1073 | 1074 | [[package]] 1075 | name = "itoa" 1076 | version = "1.0.10" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 1079 | 1080 | [[package]] 1081 | name = "jpeg-decoder" 1082 | version = "0.3.1" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" 1085 | dependencies = [ 1086 | "rayon", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "js-sys" 1091 | version = "0.3.67" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" 1094 | dependencies = [ 1095 | "wasm-bindgen", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "kernel32-sys" 1100 | version = "0.2.2" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1103 | dependencies = [ 1104 | "winapi 0.2.8", 1105 | "winapi-build", 1106 | ] 1107 | 1108 | [[package]] 1109 | name = "lazy_static" 1110 | version = "1.4.0" 1111 | source = "registry+https://github.com/rust-lang/crates.io-index" 1112 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1113 | 1114 | [[package]] 1115 | name = "lebe" 1116 | version = "0.5.2" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" 1119 | 1120 | [[package]] 1121 | name = "libc" 1122 | version = "0.2.152" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" 1125 | 1126 | [[package]] 1127 | name = "libredox" 1128 | version = "0.0.1" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" 1131 | dependencies = [ 1132 | "bitflags 2.4.1", 1133 | "libc", 1134 | "redox_syscall", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "libredox" 1139 | version = "0.0.2" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" 1142 | dependencies = [ 1143 | "bitflags 2.4.1", 1144 | "libc", 1145 | "redox_syscall", 1146 | ] 1147 | 1148 | [[package]] 1149 | name = "linux-raw-sys" 1150 | version = "0.4.12" 1151 | source = "registry+https://github.com/rust-lang/crates.io-index" 1152 | checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" 1153 | 1154 | [[package]] 1155 | name = "lock_api" 1156 | version = "0.4.11" 1157 | source = "registry+https://github.com/rust-lang/crates.io-index" 1158 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 1159 | dependencies = [ 1160 | "autocfg", 1161 | "scopeguard", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "log" 1166 | version = "0.4.20" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 1169 | 1170 | [[package]] 1171 | name = "log-derive" 1172 | version = "0.4.1" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "6a42526bb432bcd1b43571d5f163984effa25409a29f1a3242a54d0577d55bcf" 1175 | dependencies = [ 1176 | "darling 0.10.2", 1177 | "proc-macro2", 1178 | "quote", 1179 | "syn 1.0.109", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "memchr" 1184 | version = "2.7.1" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 1187 | 1188 | [[package]] 1189 | name = "memoffset" 1190 | version = "0.6.5" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1193 | dependencies = [ 1194 | "autocfg", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "mini-internal" 1199 | version = "0.1.36" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "51c55587ac25c2d63a75e4171221b2803a9b9e83aeb7bdfde5833c4cd578b50d" 1202 | dependencies = [ 1203 | "proc-macro2", 1204 | "quote", 1205 | "syn 2.0.48", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "miniserde" 1210 | version = "0.1.36" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "8621df4a46e5de4c1541242407da38281ea0e320b94e238477688a36a1a059f7" 1213 | dependencies = [ 1214 | "itoa", 1215 | "mini-internal", 1216 | "ryu", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "miniz_oxide" 1221 | version = "0.7.1" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1224 | dependencies = [ 1225 | "adler", 1226 | "simd-adler32", 1227 | ] 1228 | 1229 | [[package]] 1230 | name = "mio" 1231 | version = "0.8.10" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" 1234 | dependencies = [ 1235 | "libc", 1236 | "wasi 0.11.0+wasi-snapshot-preview1", 1237 | "windows-sys 0.48.0", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "nibble_vec" 1242 | version = "0.1.0" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" 1245 | dependencies = [ 1246 | "smallvec", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "nix" 1251 | version = "0.24.3" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" 1254 | dependencies = [ 1255 | "bitflags 1.3.2", 1256 | "cfg-if", 1257 | "libc", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "nix" 1262 | version = "0.25.1" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" 1265 | dependencies = [ 1266 | "autocfg", 1267 | "bitflags 1.3.2", 1268 | "cfg-if", 1269 | "libc", 1270 | "memoffset", 1271 | "pin-utils", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "nix" 1276 | version = "0.26.4" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" 1279 | dependencies = [ 1280 | "bitflags 1.3.2", 1281 | "cfg-if", 1282 | "libc", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "num-traits" 1287 | version = "0.2.17" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 1290 | dependencies = [ 1291 | "autocfg", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "num_cpus" 1296 | version = "1.16.0" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1299 | dependencies = [ 1300 | "hermit-abi 0.3.3", 1301 | "libc", 1302 | ] 1303 | 1304 | [[package]] 1305 | name = "numtoa" 1306 | version = "0.1.0" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" 1309 | 1310 | [[package]] 1311 | name = "nvim-rs" 1312 | version = "0.4.0" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "28f2726e013fbe2d39a8471eba99ae60b91ba602f330adf12f0dd206f413b1b4" 1315 | dependencies = [ 1316 | "async-trait", 1317 | "futures 0.3.30", 1318 | "log", 1319 | "parity-tokio-ipc", 1320 | "rmp", 1321 | "rmpv", 1322 | "tokio", 1323 | "tokio-util 0.6.10", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "object" 1328 | version = "0.32.2" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 1331 | dependencies = [ 1332 | "memchr", 1333 | ] 1334 | 1335 | [[package]] 1336 | name = "once_cell" 1337 | version = "1.19.0" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1340 | 1341 | [[package]] 1342 | name = "os_str_bytes" 1343 | version = "6.6.1" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" 1346 | 1347 | [[package]] 1348 | name = "parity-tokio-ipc" 1349 | version = "0.9.0" 1350 | source = "registry+https://github.com/rust-lang/crates.io-index" 1351 | checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" 1352 | dependencies = [ 1353 | "futures 0.3.30", 1354 | "libc", 1355 | "log", 1356 | "rand 0.7.3", 1357 | "tokio", 1358 | "winapi 0.3.9", 1359 | ] 1360 | 1361 | [[package]] 1362 | name = "parking_lot" 1363 | version = "0.12.1" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1366 | dependencies = [ 1367 | "lock_api", 1368 | "parking_lot_core", 1369 | ] 1370 | 1371 | [[package]] 1372 | name = "parking_lot_core" 1373 | version = "0.9.9" 1374 | source = "registry+https://github.com/rust-lang/crates.io-index" 1375 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 1376 | dependencies = [ 1377 | "cfg-if", 1378 | "libc", 1379 | "redox_syscall", 1380 | "smallvec", 1381 | "windows-targets 0.48.5", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "paste" 1386 | version = "1.0.14" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" 1389 | 1390 | [[package]] 1391 | name = "pin-project-lite" 1392 | version = "0.2.13" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 1395 | 1396 | [[package]] 1397 | name = "pin-utils" 1398 | version = "0.1.0" 1399 | source = "registry+https://github.com/rust-lang/crates.io-index" 1400 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1401 | 1402 | [[package]] 1403 | name = "png" 1404 | version = "0.17.11" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "1f6c3c3e617595665b8ea2ff95a86066be38fb121ff920a9c0eb282abcd1da5a" 1407 | dependencies = [ 1408 | "bitflags 1.3.2", 1409 | "crc32fast", 1410 | "fdeflate", 1411 | "flate2", 1412 | "miniz_oxide", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "powerfmt" 1417 | version = "0.2.0" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1420 | 1421 | [[package]] 1422 | name = "ppv-lite86" 1423 | version = "0.2.17" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1426 | 1427 | [[package]] 1428 | name = "proc-macro-error" 1429 | version = "1.0.4" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1432 | dependencies = [ 1433 | "proc-macro-error-attr", 1434 | "proc-macro2", 1435 | "quote", 1436 | "syn 1.0.109", 1437 | "version_check", 1438 | ] 1439 | 1440 | [[package]] 1441 | name = "proc-macro-error-attr" 1442 | version = "1.0.4" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1445 | dependencies = [ 1446 | "proc-macro2", 1447 | "quote", 1448 | "version_check", 1449 | ] 1450 | 1451 | [[package]] 1452 | name = "proc-macro2" 1453 | version = "1.0.76" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" 1456 | dependencies = [ 1457 | "unicode-ident", 1458 | ] 1459 | 1460 | [[package]] 1461 | name = "pty" 1462 | version = "0.2.2" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "f50f3d255966981eb4e4c5df3e983e6f7d163221f547406d83b6a460ff5c5ee8" 1465 | dependencies = [ 1466 | "errno 0.1.8", 1467 | "libc", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "qoi" 1472 | version = "0.4.1" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" 1475 | dependencies = [ 1476 | "bytemuck", 1477 | ] 1478 | 1479 | [[package]] 1480 | name = "quote" 1481 | version = "1.0.35" 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" 1483 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 1484 | dependencies = [ 1485 | "proc-macro2", 1486 | ] 1487 | 1488 | [[package]] 1489 | name = "radix_trie" 1490 | version = "0.2.1" 1491 | source = "registry+https://github.com/rust-lang/crates.io-index" 1492 | checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" 1493 | dependencies = [ 1494 | "endian-type", 1495 | "nibble_vec", 1496 | ] 1497 | 1498 | [[package]] 1499 | name = "rand" 1500 | version = "0.7.3" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1503 | dependencies = [ 1504 | "getrandom 0.1.16", 1505 | "libc", 1506 | "rand_chacha 0.2.2", 1507 | "rand_core 0.5.1", 1508 | "rand_hc", 1509 | ] 1510 | 1511 | [[package]] 1512 | name = "rand" 1513 | version = "0.8.5" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1516 | dependencies = [ 1517 | "libc", 1518 | "rand_chacha 0.3.1", 1519 | "rand_core 0.6.4", 1520 | ] 1521 | 1522 | [[package]] 1523 | name = "rand_chacha" 1524 | version = "0.2.2" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1527 | dependencies = [ 1528 | "ppv-lite86", 1529 | "rand_core 0.5.1", 1530 | ] 1531 | 1532 | [[package]] 1533 | name = "rand_chacha" 1534 | version = "0.3.1" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1537 | dependencies = [ 1538 | "ppv-lite86", 1539 | "rand_core 0.6.4", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "rand_core" 1544 | version = "0.5.1" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1547 | dependencies = [ 1548 | "getrandom 0.1.16", 1549 | ] 1550 | 1551 | [[package]] 1552 | name = "rand_core" 1553 | version = "0.6.4" 1554 | source = "registry+https://github.com/rust-lang/crates.io-index" 1555 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1556 | dependencies = [ 1557 | "getrandom 0.2.12", 1558 | ] 1559 | 1560 | [[package]] 1561 | name = "rand_hc" 1562 | version = "0.2.0" 1563 | source = "registry+https://github.com/rust-lang/crates.io-index" 1564 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1565 | dependencies = [ 1566 | "rand_core 0.5.1", 1567 | ] 1568 | 1569 | [[package]] 1570 | name = "rayon" 1571 | version = "1.8.0" 1572 | source = "registry+https://github.com/rust-lang/crates.io-index" 1573 | checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" 1574 | dependencies = [ 1575 | "either", 1576 | "rayon-core", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "rayon-core" 1581 | version = "1.12.0" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" 1584 | dependencies = [ 1585 | "crossbeam-deque", 1586 | "crossbeam-utils", 1587 | ] 1588 | 1589 | [[package]] 1590 | name = "redox_syscall" 1591 | version = "0.4.1" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 1594 | dependencies = [ 1595 | "bitflags 1.3.2", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "redox_termios" 1600 | version = "0.1.3" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb" 1603 | 1604 | [[package]] 1605 | name = "redox_users" 1606 | version = "0.4.4" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" 1609 | dependencies = [ 1610 | "getrandom 0.2.12", 1611 | "libredox 0.0.1", 1612 | "thiserror", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "regex" 1617 | version = "1.10.2" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 1620 | dependencies = [ 1621 | "aho-corasick", 1622 | "memchr", 1623 | "regex-automata", 1624 | "regex-syntax", 1625 | ] 1626 | 1627 | [[package]] 1628 | name = "regex-automata" 1629 | version = "0.4.3" 1630 | source = "registry+https://github.com/rust-lang/crates.io-index" 1631 | checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 1632 | dependencies = [ 1633 | "aho-corasick", 1634 | "memchr", 1635 | "regex-syntax", 1636 | ] 1637 | 1638 | [[package]] 1639 | name = "regex-syntax" 1640 | version = "0.8.2" 1641 | source = "registry+https://github.com/rust-lang/crates.io-index" 1642 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 1643 | 1644 | [[package]] 1645 | name = "rmp" 1646 | version = "0.8.12" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" 1649 | dependencies = [ 1650 | "byteorder", 1651 | "num-traits", 1652 | "paste", 1653 | ] 1654 | 1655 | [[package]] 1656 | name = "rmpv" 1657 | version = "1.0.1" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "2e0e0214a4a2b444ecce41a4025792fc31f77c7bb89c46d253953ea8c65701ec" 1660 | dependencies = [ 1661 | "num-traits", 1662 | "rmp", 1663 | ] 1664 | 1665 | [[package]] 1666 | name = "rust-embed" 1667 | version = "6.8.1" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" 1670 | dependencies = [ 1671 | "rust-embed-impl", 1672 | "rust-embed-utils", 1673 | "walkdir", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "rust-embed-impl" 1678 | version = "6.8.1" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" 1681 | dependencies = [ 1682 | "proc-macro2", 1683 | "quote", 1684 | "rust-embed-utils", 1685 | "syn 2.0.48", 1686 | "walkdir", 1687 | ] 1688 | 1689 | [[package]] 1690 | name = "rust-embed-utils" 1691 | version = "7.8.1" 1692 | source = "registry+https://github.com/rust-lang/crates.io-index" 1693 | checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" 1694 | dependencies = [ 1695 | "sha2", 1696 | "walkdir", 1697 | ] 1698 | 1699 | [[package]] 1700 | name = "rustc-demangle" 1701 | version = "0.1.23" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1704 | 1705 | [[package]] 1706 | name = "rustix" 1707 | version = "0.38.30" 1708 | source = "registry+https://github.com/rust-lang/crates.io-index" 1709 | checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" 1710 | dependencies = [ 1711 | "bitflags 2.4.1", 1712 | "errno 0.3.8", 1713 | "libc", 1714 | "linux-raw-sys", 1715 | "windows-sys 0.52.0", 1716 | ] 1717 | 1718 | [[package]] 1719 | name = "rustversion" 1720 | version = "1.0.14" 1721 | source = "registry+https://github.com/rust-lang/crates.io-index" 1722 | checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" 1723 | 1724 | [[package]] 1725 | name = "rustyline" 1726 | version = "11.0.0" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "5dfc8644681285d1fb67a467fb3021bfea306b99b4146b166a1fe3ada965eece" 1729 | dependencies = [ 1730 | "bitflags 1.3.2", 1731 | "cfg-if", 1732 | "clipboard-win", 1733 | "dirs-next", 1734 | "fd-lock", 1735 | "libc", 1736 | "log", 1737 | "memchr", 1738 | "nix 0.26.4", 1739 | "radix_trie", 1740 | "scopeguard", 1741 | "unicode-segmentation", 1742 | "unicode-width", 1743 | "utf8parse", 1744 | "winapi 0.3.9", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "ryu" 1749 | version = "1.0.16" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" 1752 | 1753 | [[package]] 1754 | name = "same-file" 1755 | version = "1.0.6" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1758 | dependencies = [ 1759 | "winapi-util", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "scoped_threadpool" 1764 | version = "0.1.9" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" 1767 | 1768 | [[package]] 1769 | name = "scopeguard" 1770 | version = "1.2.0" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1773 | 1774 | [[package]] 1775 | name = "serde" 1776 | version = "1.0.195" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" 1779 | dependencies = [ 1780 | "serde_derive", 1781 | ] 1782 | 1783 | [[package]] 1784 | name = "serde_derive" 1785 | version = "1.0.195" 1786 | source = "registry+https://github.com/rust-lang/crates.io-index" 1787 | checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" 1788 | dependencies = [ 1789 | "proc-macro2", 1790 | "quote", 1791 | "syn 2.0.48", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "sha2" 1796 | version = "0.10.8" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1799 | dependencies = [ 1800 | "cfg-if", 1801 | "cpufeatures", 1802 | "digest", 1803 | ] 1804 | 1805 | [[package]] 1806 | name = "shlex" 1807 | version = "1.2.0" 1808 | source = "registry+https://github.com/rust-lang/crates.io-index" 1809 | checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" 1810 | 1811 | [[package]] 1812 | name = "signal-hook" 1813 | version = "0.3.17" 1814 | source = "registry+https://github.com/rust-lang/crates.io-index" 1815 | checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 1816 | dependencies = [ 1817 | "libc", 1818 | "signal-hook-registry", 1819 | ] 1820 | 1821 | [[package]] 1822 | name = "signal-hook-registry" 1823 | version = "1.4.1" 1824 | source = "registry+https://github.com/rust-lang/crates.io-index" 1825 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1826 | dependencies = [ 1827 | "libc", 1828 | ] 1829 | 1830 | [[package]] 1831 | name = "simd-adler32" 1832 | version = "0.3.7" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 1835 | 1836 | [[package]] 1837 | name = "skim" 1838 | version = "0.10.4" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "e5d28de0a6cb2cdd83a076f1de9d965b973ae08b244df1aa70b432946dda0f32" 1841 | dependencies = [ 1842 | "atty", 1843 | "beef", 1844 | "bitflags 1.3.2", 1845 | "chrono", 1846 | "clap 3.2.25", 1847 | "crossbeam", 1848 | "defer-drop", 1849 | "derive_builder", 1850 | "env_logger", 1851 | "fuzzy-matcher", 1852 | "lazy_static", 1853 | "log", 1854 | "nix 0.25.1", 1855 | "rayon", 1856 | "regex", 1857 | "shlex", 1858 | "time", 1859 | "timer", 1860 | "tuikit", 1861 | "unicode-width", 1862 | "vte", 1863 | ] 1864 | 1865 | [[package]] 1866 | name = "slab" 1867 | version = "0.4.9" 1868 | source = "registry+https://github.com/rust-lang/crates.io-index" 1869 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1870 | dependencies = [ 1871 | "autocfg", 1872 | ] 1873 | 1874 | [[package]] 1875 | name = "smallvec" 1876 | version = "1.12.0" 1877 | source = "registry+https://github.com/rust-lang/crates.io-index" 1878 | checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" 1879 | 1880 | [[package]] 1881 | name = "socket2" 1882 | version = "0.5.5" 1883 | source = "registry+https://github.com/rust-lang/crates.io-index" 1884 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 1885 | dependencies = [ 1886 | "libc", 1887 | "windows-sys 0.48.0", 1888 | ] 1889 | 1890 | [[package]] 1891 | name = "spin" 1892 | version = "0.9.8" 1893 | source = "registry+https://github.com/rust-lang/crates.io-index" 1894 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1895 | dependencies = [ 1896 | "lock_api", 1897 | ] 1898 | 1899 | [[package]] 1900 | name = "str-buf" 1901 | version = "1.0.6" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 1904 | 1905 | [[package]] 1906 | name = "strsim" 1907 | version = "0.9.3" 1908 | source = "registry+https://github.com/rust-lang/crates.io-index" 1909 | checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" 1910 | 1911 | [[package]] 1912 | name = "strsim" 1913 | version = "0.10.0" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1916 | 1917 | [[package]] 1918 | name = "syn" 1919 | version = "1.0.109" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1922 | dependencies = [ 1923 | "proc-macro2", 1924 | "quote", 1925 | "unicode-ident", 1926 | ] 1927 | 1928 | [[package]] 1929 | name = "syn" 1930 | version = "2.0.48" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" 1933 | dependencies = [ 1934 | "proc-macro2", 1935 | "quote", 1936 | "unicode-ident", 1937 | ] 1938 | 1939 | [[package]] 1940 | name = "term" 1941 | version = "0.7.0" 1942 | source = "registry+https://github.com/rust-lang/crates.io-index" 1943 | checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" 1944 | dependencies = [ 1945 | "dirs-next", 1946 | "rustversion", 1947 | "winapi 0.3.9", 1948 | ] 1949 | 1950 | [[package]] 1951 | name = "term_size" 1952 | version = "0.3.2" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" 1955 | dependencies = [ 1956 | "libc", 1957 | "winapi 0.3.9", 1958 | ] 1959 | 1960 | [[package]] 1961 | name = "termcolor" 1962 | version = "1.4.1" 1963 | source = "registry+https://github.com/rust-lang/crates.io-index" 1964 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 1965 | dependencies = [ 1966 | "winapi-util", 1967 | ] 1968 | 1969 | [[package]] 1970 | name = "termion" 1971 | version = "2.0.3" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "c4648c7def6f2043b2568617b9f9b75eae88ca185dbc1f1fda30e95a85d49d7d" 1974 | dependencies = [ 1975 | "libc", 1976 | "libredox 0.0.2", 1977 | "numtoa", 1978 | "redox_termios", 1979 | ] 1980 | 1981 | [[package]] 1982 | name = "textwrap" 1983 | version = "0.16.0" 1984 | source = "registry+https://github.com/rust-lang/crates.io-index" 1985 | checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" 1986 | 1987 | [[package]] 1988 | name = "thiserror" 1989 | version = "1.0.56" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" 1992 | dependencies = [ 1993 | "thiserror-impl", 1994 | ] 1995 | 1996 | [[package]] 1997 | name = "thiserror-impl" 1998 | version = "1.0.56" 1999 | source = "registry+https://github.com/rust-lang/crates.io-index" 2000 | checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" 2001 | dependencies = [ 2002 | "proc-macro2", 2003 | "quote", 2004 | "syn 2.0.48", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "thread_local" 2009 | version = "1.1.7" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" 2012 | dependencies = [ 2013 | "cfg-if", 2014 | "once_cell", 2015 | ] 2016 | 2017 | [[package]] 2018 | name = "tiff" 2019 | version = "0.9.1" 2020 | source = "registry+https://github.com/rust-lang/crates.io-index" 2021 | checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" 2022 | dependencies = [ 2023 | "flate2", 2024 | "jpeg-decoder", 2025 | "weezl", 2026 | ] 2027 | 2028 | [[package]] 2029 | name = "time" 2030 | version = "0.3.31" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" 2033 | dependencies = [ 2034 | "deranged", 2035 | "powerfmt", 2036 | "serde", 2037 | "time-core", 2038 | ] 2039 | 2040 | [[package]] 2041 | name = "time-core" 2042 | version = "0.1.2" 2043 | source = "registry+https://github.com/rust-lang/crates.io-index" 2044 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2045 | 2046 | [[package]] 2047 | name = "timeout-readwrite" 2048 | version = "0.3.3" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "37312ddc0adbd0f112618a4250ac586448151ff6d69241ff061b29b883349f3e" 2051 | dependencies = [ 2052 | "nix 0.26.4", 2053 | ] 2054 | 2055 | [[package]] 2056 | name = "timer" 2057 | version = "0.2.0" 2058 | source = "registry+https://github.com/rust-lang/crates.io-index" 2059 | checksum = "31d42176308937165701f50638db1c31586f183f1aab416268216577aec7306b" 2060 | dependencies = [ 2061 | "chrono", 2062 | ] 2063 | 2064 | [[package]] 2065 | name = "tokio" 2066 | version = "1.35.1" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" 2069 | dependencies = [ 2070 | "backtrace", 2071 | "bytes 1.5.0", 2072 | "libc", 2073 | "mio", 2074 | "num_cpus", 2075 | "parking_lot", 2076 | "pin-project-lite", 2077 | "signal-hook-registry", 2078 | "socket2", 2079 | "tokio-macros", 2080 | "windows-sys 0.48.0", 2081 | ] 2082 | 2083 | [[package]] 2084 | name = "tokio-io" 2085 | version = "0.1.13" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" 2088 | dependencies = [ 2089 | "bytes 0.4.12", 2090 | "futures 0.1.31", 2091 | "log", 2092 | ] 2093 | 2094 | [[package]] 2095 | name = "tokio-macros" 2096 | version = "2.2.0" 2097 | source = "registry+https://github.com/rust-lang/crates.io-index" 2098 | checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" 2099 | dependencies = [ 2100 | "proc-macro2", 2101 | "quote", 2102 | "syn 2.0.48", 2103 | ] 2104 | 2105 | [[package]] 2106 | name = "tokio-util" 2107 | version = "0.6.10" 2108 | source = "registry+https://github.com/rust-lang/crates.io-index" 2109 | checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" 2110 | dependencies = [ 2111 | "bytes 1.5.0", 2112 | "futures-core", 2113 | "futures-io", 2114 | "futures-sink", 2115 | "log", 2116 | "pin-project-lite", 2117 | "tokio", 2118 | ] 2119 | 2120 | [[package]] 2121 | name = "tokio-util" 2122 | version = "0.7.10" 2123 | source = "registry+https://github.com/rust-lang/crates.io-index" 2124 | checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" 2125 | dependencies = [ 2126 | "bytes 1.5.0", 2127 | "futures-core", 2128 | "futures-io", 2129 | "futures-sink", 2130 | "pin-project-lite", 2131 | "tokio", 2132 | ] 2133 | 2134 | [[package]] 2135 | name = "tuikit" 2136 | version = "0.5.0" 2137 | source = "registry+https://github.com/rust-lang/crates.io-index" 2138 | checksum = "5e19c6ab038babee3d50c8c12ff8b910bdb2196f62278776422f50390d8e53d8" 2139 | dependencies = [ 2140 | "bitflags 1.3.2", 2141 | "lazy_static", 2142 | "log", 2143 | "nix 0.24.3", 2144 | "term", 2145 | "unicode-width", 2146 | ] 2147 | 2148 | [[package]] 2149 | name = "typenum" 2150 | version = "1.17.0" 2151 | source = "registry+https://github.com/rust-lang/crates.io-index" 2152 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2153 | 2154 | [[package]] 2155 | name = "unicode-ident" 2156 | version = "1.0.12" 2157 | source = "registry+https://github.com/rust-lang/crates.io-index" 2158 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2159 | 2160 | [[package]] 2161 | name = "unicode-segmentation" 2162 | version = "1.10.1" 2163 | source = "registry+https://github.com/rust-lang/crates.io-index" 2164 | checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 2165 | 2166 | [[package]] 2167 | name = "unicode-width" 2168 | version = "0.1.11" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" 2171 | 2172 | [[package]] 2173 | name = "utf8parse" 2174 | version = "0.2.1" 2175 | source = "registry+https://github.com/rust-lang/crates.io-index" 2176 | checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 2177 | 2178 | [[package]] 2179 | name = "version_check" 2180 | version = "0.9.4" 2181 | source = "registry+https://github.com/rust-lang/crates.io-index" 2182 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2183 | 2184 | [[package]] 2185 | name = "vmux" 2186 | version = "0.1.13" 2187 | dependencies = [ 2188 | "baus", 2189 | "blockish", 2190 | "clap 4.4.17", 2191 | "dirs", 2192 | "diss", 2193 | "fern", 2194 | "futures 0.3.30", 2195 | "log", 2196 | "log-derive", 2197 | "nvim-rs", 2198 | "parity-tokio-ipc", 2199 | "rand 0.8.5", 2200 | "regex", 2201 | "rust-embed", 2202 | "rustyline", 2203 | "skim", 2204 | "termion", 2205 | "tokio", 2206 | "tokio-util 0.7.10", 2207 | ] 2208 | 2209 | [[package]] 2210 | name = "vte" 2211 | version = "0.11.1" 2212 | source = "registry+https://github.com/rust-lang/crates.io-index" 2213 | checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" 2214 | dependencies = [ 2215 | "arrayvec", 2216 | "utf8parse", 2217 | "vte_generate_state_changes", 2218 | ] 2219 | 2220 | [[package]] 2221 | name = "vte_generate_state_changes" 2222 | version = "0.1.1" 2223 | source = "registry+https://github.com/rust-lang/crates.io-index" 2224 | checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" 2225 | dependencies = [ 2226 | "proc-macro2", 2227 | "quote", 2228 | ] 2229 | 2230 | [[package]] 2231 | name = "walkdir" 2232 | version = "2.4.0" 2233 | source = "registry+https://github.com/rust-lang/crates.io-index" 2234 | checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 2235 | dependencies = [ 2236 | "same-file", 2237 | "winapi-util", 2238 | ] 2239 | 2240 | [[package]] 2241 | name = "wasi" 2242 | version = "0.9.0+wasi-snapshot-preview1" 2243 | source = "registry+https://github.com/rust-lang/crates.io-index" 2244 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2245 | 2246 | [[package]] 2247 | name = "wasi" 2248 | version = "0.11.0+wasi-snapshot-preview1" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2251 | 2252 | [[package]] 2253 | name = "wasm-bindgen" 2254 | version = "0.2.90" 2255 | source = "registry+https://github.com/rust-lang/crates.io-index" 2256 | checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" 2257 | dependencies = [ 2258 | "cfg-if", 2259 | "wasm-bindgen-macro", 2260 | ] 2261 | 2262 | [[package]] 2263 | name = "wasm-bindgen-backend" 2264 | version = "0.2.90" 2265 | source = "registry+https://github.com/rust-lang/crates.io-index" 2266 | checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" 2267 | dependencies = [ 2268 | "bumpalo", 2269 | "log", 2270 | "once_cell", 2271 | "proc-macro2", 2272 | "quote", 2273 | "syn 2.0.48", 2274 | "wasm-bindgen-shared", 2275 | ] 2276 | 2277 | [[package]] 2278 | name = "wasm-bindgen-macro" 2279 | version = "0.2.90" 2280 | source = "registry+https://github.com/rust-lang/crates.io-index" 2281 | checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" 2282 | dependencies = [ 2283 | "quote", 2284 | "wasm-bindgen-macro-support", 2285 | ] 2286 | 2287 | [[package]] 2288 | name = "wasm-bindgen-macro-support" 2289 | version = "0.2.90" 2290 | source = "registry+https://github.com/rust-lang/crates.io-index" 2291 | checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" 2292 | dependencies = [ 2293 | "proc-macro2", 2294 | "quote", 2295 | "syn 2.0.48", 2296 | "wasm-bindgen-backend", 2297 | "wasm-bindgen-shared", 2298 | ] 2299 | 2300 | [[package]] 2301 | name = "wasm-bindgen-shared" 2302 | version = "0.2.90" 2303 | source = "registry+https://github.com/rust-lang/crates.io-index" 2304 | checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" 2305 | 2306 | [[package]] 2307 | name = "web-sys" 2308 | version = "0.3.67" 2309 | source = "registry+https://github.com/rust-lang/crates.io-index" 2310 | checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" 2311 | dependencies = [ 2312 | "js-sys", 2313 | "wasm-bindgen", 2314 | ] 2315 | 2316 | [[package]] 2317 | name = "weezl" 2318 | version = "0.1.7" 2319 | source = "registry+https://github.com/rust-lang/crates.io-index" 2320 | checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" 2321 | 2322 | [[package]] 2323 | name = "whoami" 2324 | version = "1.4.1" 2325 | source = "registry+https://github.com/rust-lang/crates.io-index" 2326 | checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" 2327 | dependencies = [ 2328 | "wasm-bindgen", 2329 | "web-sys", 2330 | ] 2331 | 2332 | [[package]] 2333 | name = "winapi" 2334 | version = "0.2.8" 2335 | source = "registry+https://github.com/rust-lang/crates.io-index" 2336 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 2337 | 2338 | [[package]] 2339 | name = "winapi" 2340 | version = "0.3.9" 2341 | source = "registry+https://github.com/rust-lang/crates.io-index" 2342 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2343 | dependencies = [ 2344 | "winapi-i686-pc-windows-gnu", 2345 | "winapi-x86_64-pc-windows-gnu", 2346 | ] 2347 | 2348 | [[package]] 2349 | name = "winapi-build" 2350 | version = "0.1.1" 2351 | source = "registry+https://github.com/rust-lang/crates.io-index" 2352 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 2353 | 2354 | [[package]] 2355 | name = "winapi-i686-pc-windows-gnu" 2356 | version = "0.4.0" 2357 | source = "registry+https://github.com/rust-lang/crates.io-index" 2358 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2359 | 2360 | [[package]] 2361 | name = "winapi-util" 2362 | version = "0.1.6" 2363 | source = "registry+https://github.com/rust-lang/crates.io-index" 2364 | checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" 2365 | dependencies = [ 2366 | "winapi 0.3.9", 2367 | ] 2368 | 2369 | [[package]] 2370 | name = "winapi-x86_64-pc-windows-gnu" 2371 | version = "0.4.0" 2372 | source = "registry+https://github.com/rust-lang/crates.io-index" 2373 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2374 | 2375 | [[package]] 2376 | name = "windows-core" 2377 | version = "0.52.0" 2378 | source = "registry+https://github.com/rust-lang/crates.io-index" 2379 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2380 | dependencies = [ 2381 | "windows-targets 0.52.0", 2382 | ] 2383 | 2384 | [[package]] 2385 | name = "windows-sys" 2386 | version = "0.48.0" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2389 | dependencies = [ 2390 | "windows-targets 0.48.5", 2391 | ] 2392 | 2393 | [[package]] 2394 | name = "windows-sys" 2395 | version = "0.52.0" 2396 | source = "registry+https://github.com/rust-lang/crates.io-index" 2397 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2398 | dependencies = [ 2399 | "windows-targets 0.52.0", 2400 | ] 2401 | 2402 | [[package]] 2403 | name = "windows-targets" 2404 | version = "0.48.5" 2405 | source = "registry+https://github.com/rust-lang/crates.io-index" 2406 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2407 | dependencies = [ 2408 | "windows_aarch64_gnullvm 0.48.5", 2409 | "windows_aarch64_msvc 0.48.5", 2410 | "windows_i686_gnu 0.48.5", 2411 | "windows_i686_msvc 0.48.5", 2412 | "windows_x86_64_gnu 0.48.5", 2413 | "windows_x86_64_gnullvm 0.48.5", 2414 | "windows_x86_64_msvc 0.48.5", 2415 | ] 2416 | 2417 | [[package]] 2418 | name = "windows-targets" 2419 | version = "0.52.0" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" 2422 | dependencies = [ 2423 | "windows_aarch64_gnullvm 0.52.0", 2424 | "windows_aarch64_msvc 0.52.0", 2425 | "windows_i686_gnu 0.52.0", 2426 | "windows_i686_msvc 0.52.0", 2427 | "windows_x86_64_gnu 0.52.0", 2428 | "windows_x86_64_gnullvm 0.52.0", 2429 | "windows_x86_64_msvc 0.52.0", 2430 | ] 2431 | 2432 | [[package]] 2433 | name = "windows_aarch64_gnullvm" 2434 | version = "0.48.5" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2437 | 2438 | [[package]] 2439 | name = "windows_aarch64_gnullvm" 2440 | version = "0.52.0" 2441 | source = "registry+https://github.com/rust-lang/crates.io-index" 2442 | checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" 2443 | 2444 | [[package]] 2445 | name = "windows_aarch64_msvc" 2446 | version = "0.48.5" 2447 | source = "registry+https://github.com/rust-lang/crates.io-index" 2448 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2449 | 2450 | [[package]] 2451 | name = "windows_aarch64_msvc" 2452 | version = "0.52.0" 2453 | source = "registry+https://github.com/rust-lang/crates.io-index" 2454 | checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" 2455 | 2456 | [[package]] 2457 | name = "windows_i686_gnu" 2458 | version = "0.48.5" 2459 | source = "registry+https://github.com/rust-lang/crates.io-index" 2460 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2461 | 2462 | [[package]] 2463 | name = "windows_i686_gnu" 2464 | version = "0.52.0" 2465 | source = "registry+https://github.com/rust-lang/crates.io-index" 2466 | checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" 2467 | 2468 | [[package]] 2469 | name = "windows_i686_msvc" 2470 | version = "0.48.5" 2471 | source = "registry+https://github.com/rust-lang/crates.io-index" 2472 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2473 | 2474 | [[package]] 2475 | name = "windows_i686_msvc" 2476 | version = "0.52.0" 2477 | source = "registry+https://github.com/rust-lang/crates.io-index" 2478 | checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" 2479 | 2480 | [[package]] 2481 | name = "windows_x86_64_gnu" 2482 | version = "0.48.5" 2483 | source = "registry+https://github.com/rust-lang/crates.io-index" 2484 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2485 | 2486 | [[package]] 2487 | name = "windows_x86_64_gnu" 2488 | version = "0.52.0" 2489 | source = "registry+https://github.com/rust-lang/crates.io-index" 2490 | checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" 2491 | 2492 | [[package]] 2493 | name = "windows_x86_64_gnullvm" 2494 | version = "0.48.5" 2495 | source = "registry+https://github.com/rust-lang/crates.io-index" 2496 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2497 | 2498 | [[package]] 2499 | name = "windows_x86_64_gnullvm" 2500 | version = "0.52.0" 2501 | source = "registry+https://github.com/rust-lang/crates.io-index" 2502 | checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" 2503 | 2504 | [[package]] 2505 | name = "windows_x86_64_msvc" 2506 | version = "0.48.5" 2507 | source = "registry+https://github.com/rust-lang/crates.io-index" 2508 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2509 | 2510 | [[package]] 2511 | name = "windows_x86_64_msvc" 2512 | version = "0.52.0" 2513 | source = "registry+https://github.com/rust-lang/crates.io-index" 2514 | checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" 2515 | 2516 | [[package]] 2517 | name = "zune-inflate" 2518 | version = "0.2.54" 2519 | source = "registry+https://github.com/rust-lang/crates.io-index" 2520 | checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" 2521 | dependencies = [ 2522 | "simd-adler32", 2523 | ] 2524 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vmux" 3 | version = "0.1.13" 4 | authors = ["yazgoo"] 5 | description = "Fuzzy Finder in rust!" 6 | documentation = "https://docs.rs/vmux" 7 | homepage = "https://github.com/yazgoo/vmux" 8 | repository = "https://github.com/yazgoo/vmux" 9 | readme = "README.md" 10 | keywords = ["fuzzy", "menu", "util"] 11 | license = "MIT" 12 | edition = "2018" 13 | 14 | [dependencies] 15 | rustyline = "11.0" 16 | rust-embed="6.6" 17 | regex = "1" 18 | blockish = "0.1" 19 | skim = "0.10" 20 | termion = "2" 21 | rand = "0.8.0" 22 | baus = "0.2.0" 23 | nvim-rs = { version = "0.4", features= [ "use_tokio" ] } 24 | parity-tokio-ipc = "0.9" 25 | tokio = "1" 26 | tokio-util = { version = "0.7", features = [ "compat" ] } 27 | dirs = "4.0" 28 | clap = { version = "4.2", features = ["derive"] } 29 | diss = "0.2.10" 30 | futures = "0.3" 31 | log = "0.4" 32 | log-derive = "0.4" 33 | fern = "0.6" 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | vmux logo 2 | 3 | [![Discord](https://img.shields.io/badge/discord--blue?logo=discord)](https://discord.gg/F684Y8rYwZ) 4 | [![Crates.io](https://img.shields.io/crates/v/vmux?style=flat-square)](https://crates.io/crates/vmux) 5 | 6 | Helper to use vim/neovim as a terminal multiplexer 7 | 8 | # video demos 9 | 10 | 11 | 12 | 15 | 18 | 21 | 22 | 23 | 31 | 39 | 45 | 46 |
13 | Neovim conf '22 presentation 14 | 16 | session switching 17 | 19 | CLI + functionalities inside vim 20 |
24 | 25 | 30 | 32 | 33 | 37 | 38 | 40 | 41 | 44 |
47 | 48 | # docker demo 49 | 50 | `docker run -it yazgoo/vmux:master` ([more info on how to use it](#interactive-usage), based on [Dockerfile](docker/Dockerfile)) 51 | 52 | # install 53 | 54 | You will need rust and cargo [installed](https://www.rust-lang.org/tools/install). 55 | 56 | Install the plugin with post-update hook to install vmux crate: 57 | 58 |
59 | with vim-plug 60 |
61 | 62 | ```vim 63 | Plug 'yazgoo/vmux', {'do': 'cargo install vmux' } 64 | ``` 65 |
66 | 67 |
68 | with lazy.nvim 69 |
70 | 71 | ```lua 72 | { 'yazgoo/vmux', build = 'cargo install vmux' } 73 | ``` 74 |
75 | 76 |
77 | with packer.nvim 78 |
79 | 80 | ```lua 81 | use { 'yazgoo/vmux', run = 'cargo install vmux' } 82 | ``` 83 |
84 | 85 | Add the following to your `.zshrc` or `.bashrc` (replace `` with vim or nvim (default)).
86 | (For vim you'll need it compiled with `+clientserver` flag) 87 | 88 |
89 | with vim-plug 90 |
91 | 92 | ```bash 93 | source ~/.config/nvim/plugged/vmux/plugin/setup_vmux.sh 94 | ``` 95 |
96 | 97 |
98 | with lazy.nvim 99 |
100 | 101 | ```bash 102 | source ~/.local/share/nvim/lazy/vmux/plugin/setup_vmux.sh 103 | ``` 104 |
105 |
106 | with packer.nvim 107 |
108 | 109 | ```bash 110 | source ~/.local/share/nvim/site/pack/packer/start/vmux/plugin/setup_vmux.sh 111 | ``` 112 |
113 | 114 | **Note**: if you are using Fish shell, consider using [bass](https://github.com/edc/bass) with the following added to `config.fish`: 115 | 116 | ```fish 117 | bass source 118 | ``` 119 | 120 | # usage 121 | 122 | ### interactive usage 123 | 124 | [video demo](https://www.youtube.com/watch?v=TIZZL5dFtQc) 125 | 126 | `vmux new` or `vmux` will start vmux in interactive mode. You'll be prompted to: 127 | 128 | - create a new session (via `New: ...` (pre-named), or `New` (custom-named)) 129 | - exit (via `Detach`) 130 | - open an existing session 131 | 132 | You can leave current session with `CTRL+g`. (you can change default escape key from `CTRL+g` (with `-e a`) to `CTRL+a` ). 133 | 134 | ### usage within vim/neovim 135 | 136 | [video demo](https://www.youtube.com/watch?v=TIZZL5dFtQc) 137 | 138 | Within vim, vmux provides integration between vim and terminal. 139 | Run [`:help vmux`](doc/vmux.txt) from within vim for more info. 140 | [Here](docker/init.vim) is an example configuration. 141 | 142 | ### cli usage 143 | 144 | - `vmux new ` creates a new session, 145 | - `vmux list` list running sessions, 146 | - `vmux attach ` attaches to a running session (as per `vmux list`) 147 | - you can group sessions with `-s` option. 148 | 149 | # customizing 150 | 151 | For an optimal experience, you should at least add 152 | `list_sessions_names` and `session_name` hook files described below. 153 | 154 | Both files must be executable 155 | (if they are a script, they should have a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix))). 156 | 157 | ### list sessions names 158 | 159 | You can define a list of new session names via `~/.config/vmux/hooks/list_sessions_names` 160 | The script just needs to output session names one per line, see [this](docker/list_sessions_names) for an example. 161 | 162 | ### session setup 163 | 164 | You can define a custom way to setup a new session via `~/.config/vmux/hooks/session_name`.
165 | The script takes the session name as argument and should print environment variables of the form `key=value`. 166 | 167 | For example, [this script](docker/session_name) will print the content of `.envrc` 168 | and set working directory to `~/dev/$1` (via `PWD` line). 169 | 170 | ### wallpaper 171 | 172 | You can put images which will be used as wallpapers inside `~/.config/vmux/wallpapers/`. 173 | 174 | ### detach / attach callbacks 175 | 176 | You can define callbacks on attach / detach session. 177 | For example, to share data between (n)vim instances (including registers content), 178 | you can use shared data files (`Shada`), by adding in your vim conf: 179 | 180 | ```vim 181 | function! VmuxCustomDetachCallback() 182 | wshada 183 | endfunction 184 | 185 | function! VmuxCustomAttachCallback() 186 | rshada 187 | endfunction 188 | ``` 189 | 190 | you can get info about current session via the following env var: 191 | 192 | - `VMUX_SESSION_GROUP`: session group name 193 | - `VMUX_DISPLAY_NAME`: session display name within current group 194 | - `VMUX_SESSION_NAME`: full session name used to identify the session uniquely 195 | -------------------------------------------------------------------------------- /assets/vmux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yazgoo/vmux/4d40d39b333cbf64fc3d7bbd0d83fd2f63abcf46/assets/vmux.png -------------------------------------------------------------------------------- /doc/NeovimConf/README.md: -------------------------------------------------------------------------------- 1 | # NeovimConf 2022 2 | 3 | This is the presentation from NeovimConf 2022. 4 | It runs in vmux, with a custom vim configuration. 5 | 6 | ## running the presentation in vmux 7 | 8 | If you want to run it, run `bash`, and then run. 9 | 10 | `source doc/NeovimConf/run` 11 | 12 | then run: 13 | 14 | `vmux new` 15 | 16 | ## generating the presentation as pdf 17 | 18 | install [marp](https://github.com/marp-team/marp) 19 | 20 | run: 21 | 22 | ``` 23 | doc/NeovimConf/topdf 24 | ``` 25 | -------------------------------------------------------------------------------- /doc/NeovimConf/clean_bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $(dirname $0) 3 | bash 4 | -------------------------------------------------------------------------------- /doc/NeovimConf/conf/hooks/list_sessions_names: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | yq -r <$(dirname $(dirname $(dirname $0)))/presentation.yml 'keys_unsorted[]' | ruby <(echo 'STDIN.each_line.to_a.each_with_index { |l, i| puts "0x#{i.to_s(16)}) #{l}" }')| tac 3 | -------------------------------------------------------------------------------- /doc/NeovimConf/conf/hooks/session_name: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | export _hash=$(echo "$1" | md5sum | cut -d\ -f1) 3 | export args_file="/tmp/tmp.neovimconf.$_hash.args" 4 | echo "$args_file" > /tmp/lol 5 | cat $args_file 6 | -------------------------------------------------------------------------------- /doc/NeovimConf/conf/wallpaper-credits: -------------------------------------------------------------------------------- 1 | NeovimConf.png comes from https://www.neovimconf.live/ 2 | -------------------------------------------------------------------------------- /doc/NeovimConf/conf/wallpapers/NeovimConf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yazgoo/vmux/4d40d39b333cbf64fc3d7bbd0d83fd2f63abcf46/doc/NeovimConf/conf/wallpapers/NeovimConf.png -------------------------------------------------------------------------------- /doc/NeovimConf/data.yml: -------------------------------------------------------------------------------- 1 | description: 2 | Hi, I'm Olivier Abdesselam aka Yazgoo, 3 | senior software engineer in the analytics team in Teads. 4 | I like functional programming, realtime streaming. 5 | I enjoy using neovim, developping terminal apps, mostly in rust. 6 | social: 7 | linkedin: https://www.linkedin.com/in/olivier-abdesselam 8 | mastodon: @oogzay@mastodon.opportunis.me https://mastodon.opportunis.me/@oogzay 9 | github: https://github.com/yazgoo/ 10 | -------------------------------------------------------------------------------- /doc/NeovimConf/demo_server_mode: -------------------------------------------------------------------------------- 1 | #!/bin/env ruby 2 | i = 0 3 | loop do 4 | puts `clear` 5 | i_100 = i % 110 6 | if i_100 < 55 7 | puts " #{" " * (i_100)}query" 8 | else 9 | puts 10 | end 11 | puts " 12 | ╭────────╮ ╭────────╮ 13 | │ Client │ ────────────> Unix Socket <───────────── │ Neovim │ 14 | ╰────────╯ ╰────────╯ 15 | " 16 | if i_100 > 55 17 | puts " #{" " * (110 - i_100)}response" 18 | else 19 | puts 20 | end 21 | i += 1 22 | sleep 0.05 23 | end 24 | -------------------------------------------------------------------------------- /doc/NeovimConf/diss: -------------------------------------------------------------------------------- 1 | #!/bin/env ruby 2 | graph=" ( ) 3 | ( ( ) diss ) 4 | ( ( pseudo term ) server ) 5 | ( ( ( nvim ) ) ) 6 | ( ( D C ) ) 7 | ( D C ) 8 | ( (program) (in ) (in ) ) 9 | ( (event ) (thread) (thread) ) 10 | ( (thread ) (# 1 ) (#2 ) ) 11 | ( D B ) 12 | D B 13 | ( unix D B ) 14 | ( domain (stream #1) (stream #2) ) 15 | ( socketsD B ) 16 | D B 17 | ( term emulator ) ( term emulator ) 18 | ( (diss client 1) ) ( (diss client 2) ) 19 | ( AAAAAAAAAAAA ) ( ) 20 | " 21 | 22 | def open(color) 23 | "\u001b[#{color}m\u001b[30m" 24 | end 25 | 26 | def close(color) 27 | "\u001b[#{color}m" 28 | end 29 | 30 | def rgb(r, g, b) 31 | "48;2;#{r};#{g};#{b}" 32 | end 33 | 34 | def colorize_line(line) 35 | colors = [rgb(16, 161, 157),rgb(84, 3, 117),rgb(255, 112, 0),rgb(255, 112, 0)] 36 | i = 0 37 | (line.each_char.to_a.map do |c| 38 | if c == '(' 39 | s = open(colors[i]) 40 | i += 1 41 | " " + s 42 | elsif c == ')' 43 | i -= 1 44 | close(0) + (i > 0 ? open(colors[i - 1]): "") + " " 45 | else 46 | c.to_s 47 | end 48 | end).join + close(0) 49 | end 50 | 51 | def colorize(g) 52 | 53 | color_template = [] 54 | g.split("\n").each.collect do |line| 55 | colorize_line(line) 56 | end.join("\n") 57 | end 58 | 59 | loop do 60 | syms = ["A", "B", "C", "D"] 61 | syms.each do |to_replace| 62 | puts `clear` 63 | puts "\u001b[?25l" 64 | res = syms.reduce(colorize(graph)) do |g, x| 65 | line = x == to_replace ? "┼ ": " " 66 | space = x == to_replace ? "│" : " " 67 | res = g.gsub(x + "+", line) 68 | if x == to_replace and x == "A" 69 | res.gsub(/A+/, "input event ") 70 | else 71 | res.gsub(x, space) 72 | end 73 | end 74 | puts res 75 | gets 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /doc/NeovimConf/img/.gitignore: -------------------------------------------------------------------------------- 1 | tmux-logo-medium.png 2 | barcode.png 3 | scalameta-logo.png 4 | -------------------------------------------------------------------------------- /doc/NeovimConf/img/vmux.png: -------------------------------------------------------------------------------- 1 | ../../../assets/vmux.png -------------------------------------------------------------------------------- /doc/NeovimConf/long_lines_limit: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 3 | read 4 | -------------------------------------------------------------------------------- /doc/NeovimConf/presentation.yml: -------------------------------------------------------------------------------- 1 | --- 2 | vmux: 3 | split: O 4 | img: barcode.png 5 | text: | 6 | a 5 year journey using neovim 7 | ============================= 8 | as a terminal multiplexer 9 | ========================= 10 | 11 | https://github.com/yazgoo/vmux 12 | 13 | # Who am I ? 14 | 15 | Olivier 'Yazgoo' Abdesselam 16 | Data engineer @teads.tv 17 | 18 | - a basic vim user 19 | - 💙 to toy with terminal emulators 🖥 20 | - 💜 rust 🦀 21 | 22 | 23 | The old times (before 2015): 24 | split: o 25 | img: tmux-logo-medium.png 26 | command: resize9 27 | text: | 28 | I used tmux 💕 + vim 29 | ``` 30 | ╭─────────────────────────┬──────────────╮ 31 | │ tmux provides │ vim provided │ 32 | ├─────────────────────────┼──────────────┤ 33 | │ 'panes' │ 'windows' │ 34 | │ 'windows' │ 'tabs' │ 35 | │ 'terminal' │ ? │ 36 | │ 'sessions' (detach) │ ? │ 37 | ╰─────────────────────────┴──────────────╯ 38 | ``` 39 | revolution: 40 | split: o 41 | term: presentation_root/clean_bash 42 | text: | 43 | nvim, 2015: https://github.com/neovim/neovim/pull/2076 44 | `:help terminal` 45 | ``` 46 | Terminal emulator *terminal* *terminal-emulator* 47 | 48 | Nvim embeds a VT220/xterm terminal emulator based on libvterm. 49 | ``` 50 | 51 | also vim, 2018 52 | Main limitation: 53 | split: O 54 | term: presentation_root/long_lines_limit 55 | text: | 56 | copy terminal buffer with line wrapping: 57 | 58 | - https://github.com/neovim/neovim/issues/2514 59 | - https://github.com/neovim/neovim/pull/11014 60 | 61 | bypass: 62 | 63 | - resize window 64 | - pipe command output to clipboard or file 65 | I decide to use it: 66 | split: o 67 | term: presentation_root/terminal_text_to_copy 68 | text : | 69 | 2017: https://yazgoo.github.io/blag/neovim/terminal/multiplexer/tmux/2017/11/29/neovim-one-week-without-tmux.html 70 | 71 | - exit terminal easily (double escape): `tnoremap ` 72 | - zoom: Plug 'dhruvasagar/vim-zoom' 73 | - copy pasting: `y` `p` work, can use `+` register. 74 | - completion: `^n` 75 | - detach : just wrap your session in dtach, screen, abduco: https://github.com/martanne/abduco 76 | neovim server mode: 77 | split: o 78 | term: presentation_root/demo_server_mode 79 | text: | 80 | - control vim within terminal via server mode: 81 | ```vim 82 | let g:server_addr = serverstart('/tmp/vim-server') 83 | ``` 84 | define a CLI to send vim command `vmux-send` 85 | ```python 86 | nvim = neovim.attach('socket', path='/tmp/vim-server') 87 | nvim.command(" ".join(sys.argv[1:])) 88 | ``` 89 | alias: 90 | split: O 91 | img: vmux.png 92 | text: | 93 | ```bash 94 | # use abduco to emulate detach 95 | alias vmux="(abduco -l|grep nvim-session) || \ 96 | rm -f /tmp/vim-server;\ 97 | abduco -e '^g' -A nvim-session nvim --cmd \ 98 | \"let g:server_addr = serverstart('/tmp/vim-server')\"" 99 | ``` 100 | 101 | And thus, vmux was born 🎉 ! 102 | 103 | => let's put it in a plugin 104 | vmux basics demo: 105 | split: O 106 | term: presentation_root/clean_bash 107 | text: | 108 | - vmux command: 109 | - vmux 110 | - vmux new 111 | - vmux list 112 | - vmux attach 113 | - in terminal: 114 | - lsplit / rsplit `my_file` 115 | - cd 116 | - $EDITOR integration 117 | - quit session 118 | - detach with ^G 119 | - stop session by quitting vim 120 | 2022, why change ?: 121 | text: | 122 | 123 | ``` 124 | before LSPs on multiple projects after LSPs on multiple projects 125 | ──────────────────────────────── ─────────────────────────────── 126 | 127 | vmux client vmux client 128 | │ │ 129 | ╰── abduco / nvim ├── abduco / nvim 130 | │ │ │ 131 | ├─── rust project ⏳ │ ╰─── rust project 132 | │ │ 133 | ╰─── scala project ⏳ ╰── abduco / nvim 134 | │ 135 | ╰─── scala project 136 | ``` 137 | 138 | => ease session switch 139 | 140 | 2022 rewrite: 141 | text: | 142 | 🦀 rust rewrite 143 | 144 | before: multiple binaries required 145 | after: one self-contained binary 146 | 147 | relies on (crates 📦): (+demo) 148 | 149 | - [skim](https://github.com/lotabout/skim) 150 | - [BauS](https://github.com/yazgoo/baus) 151 | - [blockish](https://github.com/yazgoo/blockish) 152 | - [diss](https://github.com/yazgoo/diss) 153 | 154 | Customizable (like this presentation 🥳) : 155 | - new session name suggestion 156 | - new session pre-hook 157 | - wallpapers 158 | 159 | about diss: 160 | split: O 161 | term: presentation_root/diss 162 | text: | 163 | Diss: 164 | 165 | - dissociates a program from current terminal 166 | - is like : 167 | - [dtach](https://github.com/crigler/dtach) 168 | - [abduco](https://github.com/martanne/abduco) 169 | - is a standalone binary 170 | - also a rust crate you can easily integrate ! 171 | 172 | Thanks : 173 | split: o 174 | bterm: blockishfire 175 | command: resize5 176 | text: | 177 | # https://github.com/yazgoo/vmux 178 | # Questions 179 | -------------------------------------------------------------------------------- /doc/NeovimConf/render_img: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | bash -c 'blockish '$IMG_PATH';read' 3 | -------------------------------------------------------------------------------- /doc/NeovimConf/run: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | script_dir=$(dirname "${BASH_SOURCE[0]}") 3 | generate_md_and_args() { 4 | presentation_root=$script_dir 5 | presentation_yml="$presentation_root"/presentation.yml 6 | if [ -e "$args_file" ] 7 | then 8 | if [ $(date +%s -r "$args_file") -gt $(date +%s -r "$presentation_yml") ] 9 | then 10 | return 11 | fi 12 | fi 13 | tmp_init_vim="/tmp/tmp.neovimconf.init.vim" 14 | args="-u $tmp_init_vim " 15 | get_page() { 16 | yq -r <"$presentation_yml" ".[\"$(echo $1 | sed 's/^[^ ]\+ //')\"].$2" 17 | } 18 | rm -f "$args_file" 19 | split=$(get_page "$1" split) 20 | if [ "$split" != null ] 21 | then 22 | args="$args -$split" 23 | fi 24 | 25 | img=$(get_page "$1" img) 26 | if [ "$img" != null ] 27 | then 28 | echo IMG_PATH="$presentation_root/img/$img" >> "$args_file" 29 | args="$args term://$presentation_root/render_img " 30 | fi 31 | 32 | term=$(get_page "$1" term | sed 's;presentation_root;'$presentation_root';') 33 | if [ "$term" != null ] 34 | then 35 | args="$args term://$term " 36 | fi 37 | 38 | 39 | render_file="/tmp/tmp.neovimconf.$_hash.md" 40 | ( 41 | echo $1 42 | echo $1 | sed 's/./=/g' 43 | echo 44 | get_page "$1" text 45 | )> "$render_file" 46 | args=$(echo "$args" | sed 's/ \+/ /g') 47 | 48 | postargs="" 49 | bterm=$(get_page "$1" bterm | sed 's;presentation_root;'$presentation_root';') 50 | if [ "$bterm" != null ] 51 | then 52 | postargs=" term://$bterm " 53 | fi 54 | 55 | _command=$(get_page "$1" command) 56 | if [ "$bterm" != null ] 57 | then 58 | postargs="$postargs -c $_command " 59 | fi 60 | 61 | echo VMUX_ADDITIONAL_ARGUMENTS="$args $render_file$postargs" | sed 's/ / /g' | sed 's/ $//' >> "$args_file" 62 | } 63 | 64 | die() { 65 | echo "$@" 66 | return 67 | } 68 | 69 | check_bin_exists() { 70 | which $1 &>/dev/null || die "please install $1 (cargo install $1)" 71 | } 72 | 73 | check_bin_exists blockish 74 | check_bin_exists blockishfire 75 | 76 | echo "downloading images..." 77 | [ -e $script_dir/img/scalameta-logo.png ] || (cd $(dirname $0)/img/; wget https://scalameta.org/metals/img/scalameta-logo.png) 78 | [ -e $script_dir/img/tmux-logo-medium.png ] || (cd $(dirname $0)/img/; wget https://github.com/tmux/tmux/raw/master/logo/tmux-logo-medium.png) 79 | [ -e $script_dir/img/barcode.png ] || (cd $(dirname $0)/img/; qrencode --foreground=000000 --background=ffffff -o barcode.png https://github.com/yazgoo/vmux) 80 | echo "generating conf..." 81 | original_init_vim="$script_dir/../../docker/init.vim" 82 | tmp_init_vim="/tmp/tmp.neovimconf.init.vim" 83 | (cat "$original_init_vim" 84 | echo " 85 | set termguicolors 86 | hi! link StatusLine Normal 87 | hi! link StatusLineNC Normal 88 | set statusline=%{repeat(' ',winwidth('.'))} 89 | set fillchars+=eob:  90 | set fillchars+=vert:  91 | set laststatus=0 92 | set nofoldenable 93 | set cmdheight=0 94 | " 95 | ) > "$tmp_init_vim" 96 | echo "generating args and markdown..." 97 | mapfile -t < <($script_dir/conf/hooks/list_sessions_names.sh) 98 | pids="" 99 | for session in "${MAPFILE[@]}" 100 | do 101 | export _hash=$(echo "$session" | md5sum | cut -d\ -f1) 102 | export args_file="/tmp/tmp.neovimconf.$_hash.args" 103 | generate_md_and_args "$session" & 104 | pids="$pids $!" 105 | done 106 | for pid in $pids 107 | do 108 | wait $pid 2>/dev/null 109 | done 110 | while true 111 | do 112 | echo "please adjust terminal size" 113 | l=$(tput lines) 114 | if [ $l -eq 26 ] 115 | then 116 | echo "terminal size ok" 117 | break 118 | fi 119 | echo got $l lines, expected 26, press enter to continue 120 | read 121 | done 122 | 123 | export LANG=C 124 | alias vmux="vmux -c $script_dir/conf -s NeovimConf" 125 | echo "run 'vmux new'" 126 | -------------------------------------------------------------------------------- /doc/NeovimConf/run_asciinema: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | while true 3 | do 4 | echo press enter to start... 5 | read 6 | asciinema play $(dirname $0)/../asciinema.cast -s 3 7 | echo "done !" 8 | done 9 | -------------------------------------------------------------------------------- /doc/NeovimConf/skim_demo: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | rain_emoji() { 4 | emoji="$1" 5 | while true 6 | do 7 | cols=$(tput cols) 8 | place=$(($RANDOM % ($cols - 1) )) 9 | for i in $(seq 1 $place); do echo -n " "; done 10 | echo "$emoji" 11 | read -n 1 -t 0.1 input 12 | if [[ $input = "q" ]] || [[ $input = "Q" ]] 13 | then 14 | echo # to get a newline after quitting 15 | break 16 | fi 17 | done 18 | } 19 | 20 | name_to_emoji() { 21 | read name 22 | case $name in 23 | hamster) 24 | echo 🐹 25 | ;; 26 | dog) 27 | echo 🐕 28 | ;; 29 | cat) 30 | echo 🐈 31 | ;; 32 | capybara) 33 | echo 🥔 34 | ;; 35 | *) 36 | echo ❓ 37 | ;; 38 | esac 39 | } 40 | 41 | while true 42 | do 43 | result=$(echo "dog 44 | hamster 45 | capybara 46 | cat" | sk --header="what's your favorite" | sed 's/.* //' | name_to_emoji) 47 | rain_emoji $result 48 | echo thanks 49 | read 50 | done 51 | -------------------------------------------------------------------------------- /doc/NeovimConf/start-term: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | set -x 3 | alacritty --config-file $(dirname $0)/alacritty.yml 4 | -------------------------------------------------------------------------------- /doc/NeovimConf/terminal_text_to_copy: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | echo lets_bring_vmux_functions_in_neovim 3 | read 4 | -------------------------------------------------------------------------------- /doc/NeovimConf/tomd: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | get_page() { 3 | yq -r <$(dirname $0)/presentation.yml ".[\"$(echo $1 | sed 's/^.*\. //')\"].$2" 4 | } 5 | 6 | markdown() { 7 | echo "--- 8 | theme: gaia 9 | _class: lead 10 | paginate: true 11 | backgroundColor: #fff 12 | backgroundImage: url('https://marp.app/assets/hero-background.svg')" 13 | 14 | yq -r <$(dirname $0)/presentation.yml 'keys_unsorted[]' | nl -w2 -s'. ' | while read section 15 | do 16 | echo "---" 17 | echo 18 | echo "# $section" 19 | echo 20 | get_page "$section" text 21 | echo 22 | done 23 | } 24 | 25 | markdown 26 | 27 | -------------------------------------------------------------------------------- /doc/NeovimConf/topdf: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | set -xe 3 | path=/tmp/$(date +%s).md 4 | $(dirname $0)/tomd > $path 5 | marp $path -o $path.pdf 6 | echo $path.pdf 7 | which zathura &>/dev/null && zathura $path.pdf 8 | -------------------------------------------------------------------------------- /doc/screencast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yazgoo/vmux/4d40d39b333cbf64fc3d7bbd0d83fd2f63abcf46/doc/screencast.png -------------------------------------------------------------------------------- /doc/tags: -------------------------------------------------------------------------------- 1 | vmux-commands vmux.txt /*vmux-commands* 2 | vmux-contents vmux.txt /*vmux-contents* 3 | vmux.txt vmux.txt /*vmux.txt* 4 | -------------------------------------------------------------------------------- /doc/vmux.txt: -------------------------------------------------------------------------------- 1 | *vmux.txt* Helper to use neovim as a terminal multiplexer 2 | 3 | __ ___ __ ___ _ ___ __ 4 | \ \ / / '_ ` _ \| | | \ \/ / 5 | \ V /| | | | | | |_| |> < 6 | \_/ |_| |_| |_|\__,_/_/\_\ 7 | 8 | Author: Olivier 'yazgoo' Abdesselam 9 | License: Same terms as Vim itself (see |license|) 10 | 11 | ============================================================================== 12 | CONTENTS *vmux-contents* 13 | 14 | Commands..................................|vmux-commands| 15 | 16 | ============================================================================== 17 | COMMANDS *vmux-commands* 18 | 19 | 20 | There are two types of commands: vim commands (which are prefixed with ':') 21 | and shell command (which are not) 22 | vsplit,split,e 23 | vsplit,split,e 24 | 25 | Does exactly like there in-vim counterpart, but from within a terminal 26 | 27 | rsplit,re 28 | rsplit,re 29 | 30 | Does exactly like e and split, but from the terminal and 31 | in the right end of your session 32 | 33 | lsplit,le 34 | lsplit,le 35 | 36 | Does exactly like e and split, but from the terminal and 37 | in the left end of your session 38 | vmux_send 39 | vmux_send 40 | 41 | send a command to your vim session from the terminal 42 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:slim 2 | 3 | # setup neovim 4 | RUN apt -y update 5 | RUN apt -y install neovim curl git 6 | 7 | # install vim-plug 8 | RUN sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 9 | 10 | # create neovim custom configuration 11 | RUN mkdir -p /root/.config/nvim/ 12 | COPY init.vim /root/.config/nvim/ 13 | 14 | # install vmux plugin 15 | RUN nvim --headless +PlugInstall +qa 16 | 17 | # setup hooks 18 | RUN mkdir -p /root/.config/vmux/hooks/ 19 | COPY list_sessions_names /root/.config/vmux/hooks/ 20 | COPY session_name /root/.config/vmux/hooks/ 21 | 22 | # integrate vmux with bash 23 | RUN echo 'source ~/.local/share/nvim/plugged/vmux/plugin/setup_vmux.sh' >> ~/.bashrc 24 | 25 | # add vmux logo in wallpapers directory 26 | RUN mkdir ~/.config/vmux/wallpapers 27 | RUN cp ~/.local/share/nvim/plugged/vmux/vmux.png ~/.config/vmux/wallpapers 28 | 29 | # create example dev directories 30 | RUN mkdir -p ~/dev/first_project ~/dev/second_project 31 | 32 | # reduce image size 33 | RUN rm -rf ~/.cargo 34 | RUN apt clean -y 35 | RUN apt remove -y curl 36 | RUN rm -rf /usr/local/cargo/registry /usr/local/rustup/ 37 | 38 | # start vmux with container 39 | ENTRYPOINT ["/bin/bash", "-c", "sleep 0.1 && vmux new"] 40 | -------------------------------------------------------------------------------- /docker/init.vim: -------------------------------------------------------------------------------- 1 | call plug#begin() 2 | Plug 'yazgoo/vmux', {'do': 'cargo install vmux' } 3 | Plug 'preservim/vim-markdown' 4 | Plug 'dhruvasagar/vim-zoom' 5 | let g:floaterm_position = 'center' 6 | let g:floaterm_width = 1.0 7 | hi NormalFloat guibg=None 8 | set winblend=0 9 | let g:floaterm_height = 1.0 10 | Plug 'voldikss/vim-floaterm' 11 | call plug#end() 12 | 13 | 14 | command! VD :VmuxDoneEditing 15 | " terminal splits shortcuts 16 | nnoremap s :VmuxSplit 17 | nnoremap v :VmuxVsplit 18 | nnoremap h :winc h 19 | nnoremap j :winc j 20 | nnoremap k :winc k 21 | nnoremap l :winc l 22 | nnoremap q :qa! 23 | 24 | nnoremap w :w 25 | nnoremap t :tabnew 26 | " double escape to leave terminal 27 | tnoremap 28 | 29 | " custom status line for 30 | set laststatus=2 31 | set statusline= 32 | set statusline+=%F 33 | set statusline+=%= 34 | set statusline+=%{substitute(getcwd(),'^.*/','','')} 35 | 36 | set shell=/bin/bash 37 | -------------------------------------------------------------------------------- /docker/list_sessions_names: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find -L ~/dev -maxdepth 1 -mindepth 1 -type d | while read d; do basename $d; done 3 | -------------------------------------------------------------------------------- /docker/session_name: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mypwd=$HOME/dev/"$1" 3 | if [ -e "$mypwd" ] 4 | then 5 | echo PWD="$mypwd" 6 | fi 7 | -------------------------------------------------------------------------------- /docker/setup-alpine.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | -------------------------------------------------------------------------------- /plugin/e: -------------------------------------------------------------------------------- 1 | vmux_send_cmd -------------------------------------------------------------------------------- /plugin/le: -------------------------------------------------------------------------------- 1 | vmux_send_winc_t -------------------------------------------------------------------------------- /plugin/lsplit: -------------------------------------------------------------------------------- 1 | vmux_send_winc_t -------------------------------------------------------------------------------- /plugin/re: -------------------------------------------------------------------------------- 1 | vmux_send_winc_l -------------------------------------------------------------------------------- /plugin/rsplit: -------------------------------------------------------------------------------- 1 | vmux_send_winc_l -------------------------------------------------------------------------------- /plugin/setup_vmux.sh: -------------------------------------------------------------------------------- 1 | if [ -z "$BASH_SOURCE" ] 2 | then 3 | export PATH="$PATH:$(dirname "$0")" 4 | else 5 | export PATH="$PATH:$(dirname "$BASH_SOURCE")" 6 | fi 7 | 8 | first_arg_possibilities="new list attach" 9 | 10 | function list_vmux_sessions() { 11 | vmux list |sed 's/\t/|/g' |cut -d\| -f3 12 | } 13 | 14 | if [ -n "$ZSH_VERSION" ] 15 | then 16 | compdef _vmux vmux 17 | 18 | function _vmux { 19 | local _line 20 | _arguments -C "1: :($first_arg_possibilities)" "*::arg:->args" 21 | 22 | case $line[1] in 23 | attach) _vmux_attach 24 | esac 25 | 26 | } 27 | 28 | function _vmux_attach { 29 | _arguments -C "1: :($(list_vmux_sessions))" "*::arg:->args" 30 | } 31 | elif [ -n "$BASH_VERSION" ] 32 | then 33 | function _vmux { 34 | local cur prev 35 | 36 | cur=${COMP_WORDS[COMP_CWORD]} 37 | prev=${COMP_WORDS[COMP_CWORD-1]} 38 | 39 | case ${COMP_CWORD} in 40 | 1) 41 | COMPREPLY=($(compgen -W "$first_arg_possibilities" -- ${cur})) 42 | ;; 43 | 2) 44 | case ${prev} in 45 | attach) 46 | COMPREPLY=($(compgen -W "$(list_vmux_sessions)" -- ${cur})) 47 | ;; 48 | esac 49 | ;; 50 | *) 51 | COMPREPLY=() 52 | ;; 53 | esac 54 | } 55 | complete -F _vmux vmux 56 | fi 57 | if [ $# -gt 0 ] 58 | then 59 | VMUX_EDITOR="$1" 60 | else 61 | VMUX_EDITOR="nvim" 62 | fi 63 | export VMUX_EDITOR 64 | [ -z "$vmux_server_file" ] && return 65 | # specific stuff to vmux session 66 | export EDITOR=vmux-editor 67 | cd() { 68 | builtin cd "$@"; 69 | vmux_send :tcd "$PWD" 70 | echo "$PWD" > ~/.cwd; 71 | } 72 | -------------------------------------------------------------------------------- /plugin/split: -------------------------------------------------------------------------------- 1 | vmux_send_cmd -------------------------------------------------------------------------------- /plugin/tabnew: -------------------------------------------------------------------------------- 1 | vmux_send_cmd -------------------------------------------------------------------------------- /plugin/vmux: -------------------------------------------------------------------------------- 1 | ../target/release/vmux -------------------------------------------------------------------------------- /plugin/vmux-editor: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | vmux edit "$@" 3 | -------------------------------------------------------------------------------- /plugin/vmux.vim: -------------------------------------------------------------------------------- 1 | function! VmuxDoneEditingCallback() 2 | let l:s = system("touch " . g:vmux_done_file_path) 3 | endfunction 4 | 5 | function! VmuxAddDoneEditingCallback() 6 | let l:winid = bufwinid(g:vmux_edited_file_path) 7 | execute("autocmd WinClosed ". l:winid . " ++once call VmuxDoneEditingCallback()") 8 | endfunction 9 | 10 | function! VmuxSplit() 11 | split +terminal | normal i 12 | endfunction 13 | command! VmuxSplit :call VmuxSplit() 14 | 15 | function! VmuxVsplit() 16 | vsplit +terminal | normal i 17 | endfunction 18 | command! VmuxVsplit :call VmuxVsplit() 19 | 20 | function! VmuxTabnew() 21 | tabnew +terminal | normal i 22 | endfunction 23 | command! VmuxTabnew :call VmuxTabnew() 24 | 25 | function! VmuxDetachCallback() 26 | if exists('*VmuxCustomDetachCallback') 27 | call VmuxCustomDetachCallback() 28 | endif 29 | endfunction 30 | 31 | function! VmuxAttachCallback() 32 | if exists('*VmuxCustomAttachCallback') 33 | call VmuxCustomAttachCallback() 34 | endif 35 | endfunction 36 | -------------------------------------------------------------------------------- /plugin/vmux_send: -------------------------------------------------------------------------------- 1 | vmux send "$@" 2 | -------------------------------------------------------------------------------- /plugin/vmux_send_cmd: -------------------------------------------------------------------------------- 1 | # make sure the shell and vim working directory are aligned 2 | vmux_send :tcd $PWD 3 | vmux_send :$(basename $0) "$@" 4 | -------------------------------------------------------------------------------- /plugin/vmux_send_winc_l: -------------------------------------------------------------------------------- 1 | caller=$(basename $0) 2 | # make sure the shell and vim working directory are aligned 3 | for file in "$@" 4 | do 5 | vmux_send :tcd $PWD 6 | vmux_send "winc l|${caller:1} $file" 7 | done 8 | -------------------------------------------------------------------------------- /plugin/vmux_send_winc_t: -------------------------------------------------------------------------------- 1 | caller=$(basename $0) 2 | # make sure the shell and vim working directory are aligned 3 | for file in "$@" 4 | do 5 | vmux_send :tcd $PWD 6 | vmux_send "winc t|${caller:1} $file" 7 | done 8 | -------------------------------------------------------------------------------- /plugin/vsplit: -------------------------------------------------------------------------------- 1 | vmux_send_cmd -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | extern crate baus; 2 | extern crate skim; 3 | use blockish::render_image_fitting_terminal; 4 | use clap::Parser; 5 | use log_derive::{logfn, logfn_inputs}; 6 | use nvim_rs::rpc::handler::Dummy; 7 | use nvim_rs::Neovim; 8 | use parity_tokio_ipc::{Connection, Endpoint}; 9 | use regex::Regex; 10 | use rust_embed::RustEmbed; 11 | use rustyline::DefaultEditor; 12 | use skim::prelude::*; 13 | use std::collections::HashMap; 14 | use std::env; 15 | use std::io::prelude::*; 16 | use std::path::Path; 17 | use std::path::PathBuf; 18 | use std::process::Command; 19 | use std::time::Duration; 20 | use std::time::SystemTime; 21 | use std::time::UNIX_EPOCH; 22 | use std::{error::Error, fmt}; 23 | use tokio::io::{split, WriteHalf}; 24 | use tokio::runtime::Handle; 25 | use tokio_util::compat::Compat; 26 | use tokio_util::compat::TokioAsyncReadCompatExt; 27 | use tokio_util::compat::TokioAsyncWriteCompatExt; // 1.0.2 // 1.0.2 28 | 29 | use rand::seq::IteratorRandom; 30 | use std::fs; 31 | 32 | #[derive(RustEmbed)] 33 | #[folder = "assets"] 34 | struct Asset; 35 | 36 | #[derive(Debug, Clone)] 37 | struct Item { 38 | text: String, 39 | } 40 | 41 | impl SkimItem for Item { 42 | fn text(&self) -> Cow { 43 | Cow::Borrowed(&self.text) 44 | } 45 | 46 | fn preview(&self, _context: PreviewContext) -> ItemPreview { 47 | ItemPreview::Text(self.text.to_owned()) 48 | } 49 | } 50 | 51 | #[derive(Debug, Clone)] 52 | struct ConfigDirNotFound; 53 | 54 | impl Error for ConfigDirNotFound {} 55 | 56 | impl fmt::Display for ConfigDirNotFound { 57 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 58 | write!(f, "home directory was not retrieved") 59 | } 60 | } 61 | 62 | #[derive(Debug, Clone)] 63 | struct SessionNotFound { 64 | display_name: String, 65 | } 66 | 67 | impl Error for SessionNotFound {} 68 | 69 | impl fmt::Display for SessionNotFound { 70 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 71 | write!(f, "seession not found {}", self.display_name) 72 | } 73 | } 74 | 75 | #[logfn(Debug)] 76 | #[logfn_inputs(Debug)] 77 | fn version() -> String { 78 | env!("CARGO_PKG_VERSION").to_string() 79 | } 80 | 81 | #[logfn(Debug)] 82 | #[logfn_inputs(Debug)] 83 | fn vmux_logo_image() -> Result, Box> { 84 | let path = format!( 85 | "/tmp/vmux-{}-b37676e3-288b-4862-a2b4-6a4d754ae391.png", 86 | version() 87 | ); 88 | if Path::new(&path).is_file() { 89 | Ok(Some(path)) 90 | } else if let Some(embed) = Asset::get("vmux.png") { 91 | fs::write(&path, embed.data) 92 | .map(|_| Some(path)) 93 | .map_err(|e| e.into()) 94 | } else { 95 | Ok(None) 96 | } 97 | } 98 | 99 | #[logfn(Debug)] 100 | #[logfn_inputs(Debug)] 101 | fn random_image( 102 | configuration_directory_path: Option, 103 | ) -> Result, Box> { 104 | let mut rng = rand::thread_rng(); 105 | let wallpapers_dir = vmux_wallpapers_path(configuration_directory_path)?; 106 | if Path::new(&wallpapers_dir).is_dir() { 107 | let files = fs::read_dir(wallpapers_dir)?; 108 | match files.choose(&mut rng) { 109 | Some(Ok(file)) => Ok(Some(file.path().display().to_string())), 110 | _ => Ok(None), 111 | } 112 | } else { 113 | vmux_logo_image() 114 | } 115 | } 116 | 117 | struct Session { 118 | name: String, 119 | display_name: String, 120 | } 121 | 122 | #[logfn_inputs(Debug)] 123 | fn list_sessions(session_group: &str) -> Result, Box> { 124 | let session_regx = Regex::new(&format!(".*{}", session_suffix(session_group)))?; 125 | Ok(diss::list_sessions()? 126 | .into_iter() 127 | .filter(|x| session_regx.is_match(x)) 128 | .map(|x| Session { 129 | name: x.clone(), 130 | display_name: x.replace(&session_suffix(session_group), ""), 131 | }) 132 | .collect()) 133 | } 134 | 135 | #[logfn(Debug)] 136 | #[logfn_inputs(Debug)] 137 | fn get_session_not_found(display_name: &str) -> Box { 138 | Box::new(SessionNotFound { 139 | display_name: display_name.to_string(), 140 | }) 141 | } 142 | 143 | #[logfn(Debug)] 144 | #[logfn_inputs(Debug)] 145 | fn get_session_full_name( 146 | display_name: String, 147 | session_group: &str, 148 | ) -> Result> { 149 | list_sessions(session_group)? 150 | .into_iter() 151 | .filter(|x| x.display_name == display_name) 152 | .map(|x| x.name) 153 | .collect::>() 154 | .get(0) 155 | .cloned() 156 | .ok_or_else(|| get_session_not_found(&display_name)) 157 | } 158 | 159 | #[logfn(Debug)] 160 | #[logfn_inputs(Debug)] 161 | fn show_session_list(session_group: String) -> Result<(), Box> { 162 | for session in list_sessions(&session_group)? { 163 | println!("{}", session.display_name); 164 | } 165 | Ok(()) 166 | } 167 | 168 | #[logfn(Debug)] 169 | fn get_session_display_name( 170 | name: String, 171 | session_list: &[Session], 172 | ) -> Result> { 173 | session_list 174 | .iter() 175 | .filter(|x| x.name == name) 176 | .map(|x| x.display_name.clone()) 177 | .collect::>() 178 | .get(0) 179 | .cloned() 180 | .ok_or_else(|| get_session_not_found(&name)) 181 | } 182 | 183 | #[logfn(Debug)] 184 | #[logfn_inputs(Debug)] 185 | fn list_sessions_with_baus( 186 | previous_session_name: String, 187 | session_group: String, 188 | ) -> Result, Box> { 189 | let args = baus::Args { 190 | name: "vmux".to_string(), 191 | action: baus::Action::Sort, 192 | value: baus::SavedValue::Timestamp, 193 | desc: true, 194 | cleanup: true, 195 | }; 196 | let cache_file_path = baus::get_cache_file_path(&args)?; 197 | let mut lines_backup = baus::get_lines_backup(&cache_file_path)?; 198 | let sessions_list_detailed = list_sessions(&session_group)?; 199 | let previous_session_name = 200 | get_session_display_name(previous_session_name, &sessions_list_detailed) 201 | .ok() 202 | .unwrap_or_default(); 203 | let a = list_sessions(&session_group)? 204 | .into_iter() 205 | .map(|x| x.name) 206 | .collect(); 207 | let sessions_list = baus::sort(&args, a, &mut lines_backup, &cache_file_path)? 208 | .into_iter() 209 | .map(|x| get_session_display_name(x, &sessions_list_detailed).unwrap()) 210 | .collect::>(); 211 | let mut sessions_with_previous: Vec = sessions_list 212 | .clone() 213 | .into_iter() 214 | .filter(|x| x.contains(&previous_session_name)) 215 | .collect(); 216 | let mut res: Vec = sessions_list 217 | .into_iter() 218 | .filter(|x| !x.contains(&previous_session_name)) 219 | .collect(); 220 | res.append(&mut sessions_with_previous); 221 | Ok(res) 222 | } 223 | 224 | #[logfn(Debug)] 225 | #[logfn_inputs(Debug)] 226 | fn save_with_baus(val: String) -> Result, Box> { 227 | let args = baus::Args { 228 | name: "vmux".to_string(), 229 | action: baus::Action::Save, 230 | value: baus::SavedValue::Timestamp, 231 | desc: true, 232 | cleanup: true, 233 | }; 234 | let cache_file_path = baus::get_cache_file_path(&args)?; 235 | let lines_backup = baus::get_lines_backup(&cache_file_path)?; 236 | let res = vec![val]; 237 | baus::save(&args, res, lines_backup, &cache_file_path) 238 | } 239 | 240 | #[logfn(Debug)] 241 | #[logfn_inputs(Debug)] 242 | fn config_dir_path(configuration_directory_path: Option) -> Result> { 243 | match configuration_directory_path { 244 | Some(dir) => Ok(dir), 245 | None => Ok(format!( 246 | "{}/vmux/", 247 | dirs::config_dir() 248 | .ok_or_else(|| Box::new(ConfigDirNotFound))? 249 | .to_string_lossy() 250 | )), 251 | } 252 | } 253 | 254 | #[logfn(Debug)] 255 | #[logfn_inputs(Debug)] 256 | fn vmux_wallpapers_path( 257 | configuration_directory_path: Option, 258 | ) -> Result> { 259 | Ok(format!( 260 | "{}/wallpapers/", 261 | config_dir_path(configuration_directory_path)? 262 | )) 263 | } 264 | 265 | #[logfn(Debug)] 266 | #[logfn_inputs(Debug)] 267 | fn vmux_hook_path( 268 | hook_name: &str, 269 | hook_extension: &str, 270 | configuration_directory_path: Option, 271 | ) -> Result> { 272 | Ok(format!( 273 | "{}/hooks/{}{}", 274 | config_dir_path(configuration_directory_path)?, 275 | hook_name, 276 | hook_extension 277 | )) 278 | } 279 | 280 | #[logfn(Debug)] 281 | #[logfn_inputs(Debug)] 282 | fn session_hook( 283 | hook_name: &str, 284 | configuration_directory_path: &Option, 285 | ) -> Result, Box> { 286 | let list_session_name_path = 287 | vmux_hook_path(hook_name, "", configuration_directory_path.clone())?; 288 | let list_session_name_f = Path::new(&list_session_name_path); 289 | let list_session_name_sh_path = 290 | vmux_hook_path(hook_name, ".sh", configuration_directory_path.clone())?; 291 | let list_session_name_sh_f = Path::new(&list_session_name_sh_path); 292 | if list_session_name_f.is_file() { 293 | Ok(Some(list_session_name_f.to_path_buf())) 294 | } else if list_session_name_sh_f.is_file() { 295 | Ok(Some(list_session_name_sh_f.to_path_buf())) 296 | } else { 297 | Ok(None) 298 | } 299 | } 300 | 301 | #[logfn(Debug)] 302 | #[logfn_inputs(Debug)] 303 | fn list_sessions_name_hook( 304 | configuration_directory_path: Option, 305 | ) -> Result, Box> { 306 | if let Some(list_session_name_path) = 307 | session_hook("list_sessions_names", &configuration_directory_path)? 308 | { 309 | let list_session_name_f = Path::new(&list_session_name_path); 310 | if list_session_name_f.is_file() { 311 | let output = Command::new(list_session_name_path).output()?; 312 | Ok(output 313 | .stdout 314 | .lines() 315 | .map(|x| format!("New: {}", x.unwrap())) 316 | .collect()) 317 | } else { 318 | Ok(vec![]) 319 | } 320 | } else { 321 | Ok(vec![]) 322 | } 323 | } 324 | 325 | #[logfn(Debug)] 326 | #[logfn_inputs(Debug)] 327 | fn session_name_hook( 328 | session_prefix: String, 329 | configuration_directory_path: Option, 330 | ) -> Result, Box> { 331 | if let Some(session_name_path) = session_hook("session_name", &configuration_directory_path)? { 332 | let res = if Path::new(&session_name_path).is_file() { 333 | let output = Command::new(session_name_path) 334 | .arg(&session_prefix) 335 | .output()?; 336 | output 337 | .stdout 338 | .lines() 339 | .map(|x| x.unwrap()) 340 | .into_iter() 341 | .collect() 342 | } else { 343 | vec![] 344 | }; 345 | Ok(res) 346 | } else { 347 | Ok(vec![]) 348 | } 349 | } 350 | 351 | #[logfn(Debug)] 352 | #[logfn_inputs(Debug)] 353 | fn list( 354 | previous_session_name: String, 355 | configuration_directory_path: Option, 356 | session_group: String, 357 | ) -> Result, Box> { 358 | let mut res = list_sessions_with_baus(previous_session_name, session_group)?; 359 | let hook = list_sessions_name_hook(configuration_directory_path)?; 360 | let cmds = vec!["Detach".to_string(), "New".to_string()]; 361 | res.extend(cmds); 362 | res.extend(hook); 363 | Ok(res) 364 | } 365 | 366 | #[logfn(Debug)] 367 | #[logfn_inputs(Debug)] 368 | fn enable_mouse() { 369 | // https://stackoverflow.com/questions/5966903/how-to-get-mousemove-and-mouseclick-in-bash 370 | print!("\x1b[?1000h"); 371 | } 372 | 373 | pub struct DissOptions { 374 | escape_key: Option, 375 | configuration_directory_path: Option, 376 | session_group: String, 377 | } 378 | 379 | #[logfn(Debug)] 380 | fn attach( 381 | handle: &Handle, 382 | session_prefix: String, 383 | diss_options: &DissOptions, 384 | ) -> Result<(), Box> { 385 | let session = format!( 386 | "{}{}", 387 | session_prefix, 388 | session_suffix(&diss_options.session_group) 389 | ); 390 | let (_, server_file) = get_server_file(&session_prefix, &diss_options.session_group)?; 391 | run_diss_and_selector( 392 | handle, 393 | server_file, 394 | &session, 395 | &Vec::new(), 396 | HashMap::new(), 397 | diss_options, 398 | ) 399 | } 400 | 401 | #[logfn(Debug)] 402 | fn run_diss_and_selector( 403 | handle: &Handle, 404 | server_file: String, 405 | session_name: &str, 406 | command: &[String], 407 | env: HashMap, 408 | diss_options: &DissOptions, 409 | ) -> Result<(), Box> { 410 | enable_mouse(); 411 | trigger_in_vim_hook(handle, server_file.clone(), "Attach".into())?; 412 | diss::run(session_name, command, env, diss_options.escape_key.clone())?; 413 | trigger_in_vim_hook(handle, server_file, "Detach".into())?; 414 | selector(handle, session_name.into(), diss_options) 415 | } 416 | 417 | #[logfn(Debug)] 418 | fn run_switch_result( 419 | handle: &Handle, 420 | res: String, 421 | diss_options: &DissOptions, 422 | ) -> Result<(), Box> { 423 | let new2_reg = Regex::new(r"^New: ")?; 424 | if res == "Detach" { 425 | println!("done") 426 | } else if res == "New" { 427 | let mut rl = DefaultEditor::new()?; 428 | let line = rl.readline("new session name: ".into())?; 429 | start_session(handle, line, diss_options)?; 430 | } else if new2_reg.is_match(&res) { 431 | start_session(handle, res.replace("New: ", ""), diss_options)?; 432 | } else { 433 | let full_name = get_session_full_name(res.clone(), &diss_options.session_group)?; 434 | save_with_baus(full_name)?; 435 | attach(handle, res, diss_options)?; 436 | } 437 | Ok(()) 438 | } 439 | 440 | pub fn selector( 441 | handle: &Handle, 442 | previous_session_name: String, 443 | diss_options: &DissOptions, 444 | ) -> Result<(), Box> { 445 | print!("{}{}", termion::clear::All, termion::cursor::Goto(1, 1)); 446 | let lines = list( 447 | previous_session_name, 448 | diss_options.configuration_directory_path.clone(), 449 | diss_options.session_group.clone(), 450 | )?; 451 | 452 | let s = termion::terminal_size()?; 453 | let columns = s.0; 454 | let lines_n = s.1; 455 | 456 | let height = lines.len() as u16; 457 | let width = lines 458 | .clone() 459 | .into_iter() 460 | .fold(0, |acc, x| std::cmp::max(acc, x.len())) as u16; 461 | 462 | let margin_h = if columns > width + 8 { 463 | columns - width - 8 464 | } else { 465 | 0 466 | }; 467 | 468 | let margin_r = margin_h / 5; 469 | let margin_l = 4 * margin_h / 5; 470 | 471 | // adjust for skim UI components 472 | let height = height + 2; 473 | 474 | let margin_v = if lines_n > height { 475 | (lines_n - height) / 2 476 | } else { 477 | lines_n / 5 478 | }; 479 | 480 | let mut options = SkimOptions::<'_> { 481 | no_clear_start: true, 482 | nosort: true, 483 | no_mouse: false, 484 | ..Default::default() 485 | }; 486 | options.no_clear_start = true; 487 | options.nosort = true; 488 | options.no_mouse = false; 489 | let margin = format!("{},{},{},{}", margin_v, margin_r, margin_v, margin_l); 490 | options.margin = Some(&margin); 491 | if let Some(img) = random_image(diss_options.configuration_directory_path.clone())? { 492 | render_image_fitting_terminal(&img) 493 | } 494 | 495 | let item_reader_option = SkimItemReaderOption::default(); 496 | 497 | let cmd_collector = Rc::new(RefCell::new(SkimItemReader::new(item_reader_option))); 498 | options.cmd_collector = cmd_collector; 499 | 500 | let (tx, rx): (SkimItemSender, SkimItemReceiver) = unbounded(); 501 | 502 | for line in lines { 503 | tx.send(Arc::new(Item { text: line }))?; 504 | } 505 | drop(tx); 506 | 507 | let selected_items = Skim::run_with(&options, Some(rx)) 508 | .map(|out| out.selected_items) 509 | .unwrap_or_else(Vec::new); 510 | for item in selected_items.iter() { 511 | let res = item.output(); 512 | run_switch_result(handle, res.to_string(), diss_options)?; 513 | } 514 | Ok(()) 515 | } 516 | 517 | #[logfn(Debug)] 518 | #[logfn_inputs(Debug)] 519 | fn help() { 520 | println!("please provide an action (new|attach|list)"); 521 | } 522 | 523 | #[logfn(Debug)] 524 | #[logfn_inputs(Debug)] 525 | fn session_suffix(session_group: &str) -> String { 526 | format!("-vmux-session{}", session_group) 527 | } 528 | 529 | #[logfn(Debug)] 530 | fn sessions_contains_full(sessions: &[Session], full_name: &str) -> bool { 531 | sessions.iter().filter(|x| x.name == full_name).count() > 0 532 | } 533 | 534 | #[logfn(Debug)] 535 | #[logfn_inputs(Debug)] 536 | fn unique_prefix(session_prefix: &str, session_group: &str) -> Result> { 537 | let sessions = list_sessions(session_group)?; 538 | if !sessions_contains_full(&sessions, session_prefix) { 539 | Ok(session_prefix.to_string()) 540 | } else { 541 | let mut i = 0; 542 | let mut full; 543 | loop { 544 | full = format!("{}-{}", session_prefix, i); 545 | if !sessions_contains_full(&sessions, &full) { 546 | break; 547 | } 548 | i += 1; 549 | } 550 | Ok(full) 551 | } 552 | } 553 | 554 | #[logfn(Debug)] 555 | #[logfn_inputs(Debug)] 556 | fn get_server_file( 557 | session_prefix: &str, 558 | session_group: &str, 559 | ) -> Result<(String, String), Box> { 560 | let id = unique_prefix(session_prefix, session_group)?; 561 | Ok((id.clone(), format!("/tmp/vim-server-{}", &id))) 562 | } 563 | 564 | #[logfn(Debug)] 565 | fn start_session( 566 | handle: &Handle, 567 | session_prefix: String, 568 | diss_options: &DissOptions, 569 | ) -> Result<(), Box> { 570 | let (id, server_file) = get_server_file(&session_prefix, &diss_options.session_group)?; 571 | if Path::new(&server_file).exists() { 572 | fs::remove_file(&server_file)?; 573 | } 574 | let session_name = format!("{}{}", id, session_suffix(&diss_options.session_group)); 575 | let env_regx = Regex::new(r"^([^=]*)=(.*)$")?; 576 | let lines: Vec = session_name_hook( 577 | session_prefix, 578 | diss_options.configuration_directory_path.clone(), 579 | )?; 580 | let mut env_vars: HashMap = lines 581 | .into_iter() 582 | .map(|line| { 583 | let x = env_regx.captures(&line).unwrap(); 584 | ( 585 | x.get(1).map_or("", |m| m.as_str()).to_string(), 586 | x.get(2).map_or("", |m| m.as_str()).to_string(), 587 | ) 588 | }) 589 | .collect(); 590 | env_vars.insert("vmux_server_file".to_string(), server_file.clone()); 591 | env_vars.insert("VMUX_SESSION_NAME".to_string(), session_name.clone()); 592 | env_vars.insert( 593 | "VMUX_SESSION_GROUP".to_string(), 594 | diss_options.session_group.clone(), 595 | ); 596 | env_vars.insert("VMUX_SESSION_DISPLAY_NAME".to_string(), id); 597 | 598 | let vmux_editor = env::var("VMUX_EDITOR").unwrap_or_else(|_| "nvim".to_string()); 599 | let mut command = if vmux_editor.contains("nvim") { 600 | vec![ 601 | vmux_editor, 602 | "--cmd".to_string(), 603 | "let g:confirm_quit_nomap = 0".to_string(), 604 | "--cmd".to_string(), 605 | format!("let g:server_addr = serverstart('{}')", server_file), 606 | ] 607 | } else { 608 | vec![ 609 | vmux_editor, 610 | "--cmd".to_string(), 611 | "let g:confirm_quit_nomap = 0".to_string(), 612 | "--servername".to_string(), 613 | server_file.clone(), 614 | ] 615 | }; 616 | if let Some(args) = env_vars.get("VMUX_ADDITIONAL_ARGUMENTS") { 617 | args.split(' ') 618 | .for_each(|arg| command.push(arg.to_string())) 619 | } 620 | save_with_baus(session_name.clone())?; 621 | run_diss_and_selector( 622 | handle, 623 | server_file, 624 | &session_name, 625 | &command, 626 | env_vars, 627 | diss_options, 628 | ) 629 | } 630 | 631 | #[logfn(Debug)] 632 | #[logfn_inputs(Debug)] 633 | fn trigger_in_vim_hook( 634 | handle: &Handle, 635 | server_file: String, 636 | hook_kind: String, 637 | ) -> Result<(), Box> { 638 | send_sync( 639 | handle, 640 | format!(":call Vmux{}Callback()", hook_kind), 641 | Some(server_file), 642 | ); 643 | Ok(()) 644 | } 645 | 646 | #[logfn(Debug)] 647 | #[logfn_inputs(Debug)] 648 | fn send_sync(handle: &Handle, command: String, vmux_server_file: Option) { 649 | let join_handle = handle.spawn(async move { 650 | let _ = send(command, vmux_server_file.clone()).await; 651 | }); 652 | futures::executor::block_on(join_handle).unwrap(); 653 | } 654 | 655 | async fn send(command: String, vmux_server_file: Option) -> Result<(), Box> { 656 | let vmux_server_file = 657 | vmux_server_file.unwrap_or_else(|| env::var("vmux_server_file").unwrap()); 658 | let handler = Dummy::new(); 659 | let path = Path::new(&vmux_server_file); 660 | let stream = Endpoint::connect(path).await?; 661 | let (reader, writer) = split(stream); 662 | let (neovim, io) = Neovim::>>::new( 663 | reader.compat(), 664 | writer.compat_write(), 665 | handler, 666 | ); 667 | let _io_handle = tokio::spawn(io); 668 | neovim.command(&command).await?; 669 | Ok(()) 670 | } 671 | 672 | async fn edit(edited_file_path: &str) -> Result<(), Box> { 673 | let start = SystemTime::now(); 674 | let since_the_epoch = start 675 | .duration_since(UNIX_EPOCH) 676 | .expect("Time went backwards"); 677 | let done_file_path = format!("/tmp/vmux_lock_{}", since_the_epoch.as_millis()); 678 | send( 679 | format!(":let g:vmux_edited_file_path = \"{}\"", edited_file_path), 680 | None, 681 | ) 682 | .await?; 683 | send( 684 | format!(":let g:vmux_done_file_path = \"{}\"", done_file_path), 685 | None, 686 | ) 687 | .await?; 688 | send(format!(":winc l|split {}", edited_file_path), None).await?; 689 | send(":call VmuxAddDoneEditingCallback()".to_string(), None).await?; 690 | println!("waiting for {} to be created...", done_file_path); 691 | while !Path::new(&done_file_path).exists() { 692 | std::thread::sleep(Duration::from_millis(200)); 693 | } 694 | Ok(()) 695 | } 696 | 697 | #[logfn(Debug)] 698 | fn run_or_selector( 699 | handle: &Handle, 700 | f: impl Fn(&Handle, String, &DissOptions) -> Result<(), Box>, 701 | args: Args, 702 | ) -> Result<(), Box> { 703 | match args.command.get(1) { 704 | Some(session_prefix) => f( 705 | handle, 706 | session_prefix.to_string(), 707 | &DissOptions { 708 | escape_key: args.escape_key, 709 | configuration_directory_path: args.configuration_directory_path, 710 | session_group: args.session_group, 711 | }, 712 | ), 713 | None => selector( 714 | handle, 715 | "".to_string(), 716 | &DissOptions { 717 | escape_key: args.escape_key, 718 | configuration_directory_path: args.configuration_directory_path, 719 | session_group: args.session_group, 720 | }, 721 | ), 722 | } 723 | } 724 | 725 | #[derive(Parser, Debug)] 726 | #[clap(author, version, about, long_about = None)] 727 | struct Args { 728 | // escape key 729 | #[clap(short, long, value_parser)] 730 | escape_key: Option, 731 | 732 | // debug 733 | #[clap(short, long, value_parser)] 734 | debug: bool, 735 | 736 | // configuration directory path 737 | #[clap(short, long, value_parser)] 738 | configuration_directory_path: Option, 739 | 740 | // name of the group of session 741 | #[clap(short, long, value_parser, default_value = "default")] 742 | session_group: String, 743 | 744 | // command 745 | command: Vec, 746 | } 747 | 748 | #[logfn(Debug)] 749 | #[logfn_inputs(Debug)] 750 | fn setup_logger() -> Result<(), fern::InitError> { 751 | fern::Dispatch::new() 752 | .format(|out, message, record| { 753 | out.finish(format_args!( 754 | "[{}][{}] {}", 755 | record.target(), 756 | record.level(), 757 | message 758 | )) 759 | }) 760 | .level(log::LevelFilter::Debug) 761 | .chain(fern::log_file("vmux.log")?) 762 | .apply()?; 763 | Ok(()) 764 | } 765 | 766 | #[tokio::main] 767 | pub async fn main() -> Result<(), Box> { 768 | let handle = Handle::current(); 769 | let mut args = Args::parse(); 770 | if args.debug { 771 | setup_logger()?; 772 | } 773 | let arg1 = args.command.get(0); 774 | match arg1 { 775 | Some(action) => { 776 | if action == "select" { 777 | run_or_selector(&handle, selector, args)?; 778 | } else if action == "attach" { 779 | run_or_selector(&handle, attach, args)?; 780 | } else if action == "new" { 781 | run_or_selector(&handle, start_session, args)?; 782 | } else if action == "list" { 783 | show_session_list(args.session_group)?; 784 | } else if action == "send" { 785 | let command = &args.command[1..].join(" "); 786 | send(command.to_string(), None).await?; 787 | } else if action == "edit" { 788 | let edited_file_path = &args.command[1..].join(" "); 789 | edit(edited_file_path).await?; 790 | } else { 791 | help(); 792 | } 793 | } 794 | None => { 795 | args.command.insert(0, "new".into()); 796 | run_or_selector(&handle, start_session, args)?; 797 | } 798 | } 799 | Ok(()) 800 | } 801 | --------------------------------------------------------------------------------