diff options
author | Jeff Zhao <jeff.no.zhao@gmail.com> | 2024-02-28 16:21:58 -0500 |
---|---|---|
committer | Jeff Zhao <jeff.no.zhao@gmail.com> | 2024-02-28 16:21:58 -0500 |
commit | dfbf093611d77e5d95c34f11a496f7f2001273ab (patch) | |
tree | a89d22b24d752a01c7f245a5654030777a00b84b | |
parent | 83bde18aca7078b846f2fc6bbe0f718c4e8c9aec (diff) | |
parent | 0796039c8a135951e1bff3654cd7a2dc8039c0fe (diff) |
Merge branch 'main' of github.com:kamiyaa/joshuto
51 files changed, 1170 insertions, 505 deletions
@@ -3,6 +3,12 @@ version = 3 [[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] name = "ahash" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -116,6 +122,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + +[[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -148,6 +166,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] +name = "bytemuck" +version = "1.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] name = "cassowary" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -244,6 +274,12 @@ dependencies = [ ] [[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] name = "colorchoice" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -288,6 +324,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] name = "crossbeam-channel" version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -298,6 +343,29 @@ dependencies = [ ] [[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", +] + +[[package]] name = "crossbeam-utils" version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -307,6 +375,12 @@ dependencies = [ ] [[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] name = "deranged" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -358,6 +432,12 @@ dependencies = [ ] [[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + +[[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -396,6 +476,22 @@ dependencies = [ ] [[package]] +name = "exr" +version = "1.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] name = "fd-lock" version = "3.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -407,6 +503,15 @@ dependencies = [ ] [[package]] +name = "fdeflate" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +dependencies = [ + "simd-adler32", +] + +[[package]] name = "filetime" version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -419,6 +524,25 @@ dependencies = [ ] [[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "spin", +] + +[[package]] name = "form_urlencoded" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -448,6 +572,16 @@ dependencies = [ ] [[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] name = "git2" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -474,6 +608,16 @@ dependencies = [ ] [[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -522,6 +666,12 @@ dependencies = [ ] [[package]] +name = "icy_sixel" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dc4d30216c3fc247730a4c6c74db2bd217a5454361ce24d70e504bda0cd345e" + +[[package]] name = "idna" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -532,6 +682,24 @@ dependencies = [ ] [[package]] +name = "image" +version = "0.24.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "exr", + "gif", + "jpeg-decoder", + "num-traits", + "png", + "qoi", + "tiff", +] + +[[package]] name = "indexmap" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -630,14 +798,17 @@ dependencies = [ "dirs-next", "filetime", "globset", + "image", "lazy_static", "libc", + "lscolors", "nix 0.27.1", "notify", "open", "phf", "rand", "ratatui", + "ratatui-image", "regex", "rustyline", "serde", @@ -656,6 +827,15 @@ dependencies = [ ] [[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +dependencies = [ + "rayon", +] + +[[package]] name = "js-sys" version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -691,6 +871,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + +[[package]] name = "libc" version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -698,9 +884,9 @@ checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libgit2-sys" -version = "0.16.1+1.7.1" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", @@ -749,6 +935,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] name = "log" version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -764,18 +960,46 @@ dependencies = [ ] [[package]] +name = "lscolors" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53304fff6ab1e597661eee37e42ea8c47a146fca280af902bb76bff8a896e523" +dependencies = [ + "nu-ansi-term", +] + +[[package]] name = "memchr" version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] name = "mio" version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -848,6 +1072,15 @@ dependencies = [ ] [[package]] +name = "nu-ansi-term" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd2800e1520bdc966782168a627aa5d1ad92e33b984bf7c7615d31280c83ff14" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] name = "num-traits" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -970,6 +1203,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] +name = "png" +version = "0.17.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c2378060fb13acff3ba0325b83442c1d2c44fbb76df481160ddc1687cce160" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] name = "powerfmt" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -991,6 +1237,15 @@ dependencies = [ ] [[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] name = "quote" version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1059,6 +1314,43 @@ dependencies = [ ] [[package]] +name = "ratatui-image" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b2b2c9623c63916694d56b7f27358ef81fd6232ffa4858444787ecbcda9f791" +dependencies = [ + "base64", + "dyn-clone", + "icy_sixel", + "image", + "rand", + "ratatui", + "rustix", + "serde", + "termion", +] + +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] name = "redox_syscall" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1249,6 +1541,12 @@ dependencies = [ ] [[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] name = "siphasher" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1261,6 +1559,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] name = "stability" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1359,6 +1666,17 @@ dependencies = [ ] [[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] name = "time" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1638,6 +1956,12 @@ dependencies = [ ] [[package]] +name = "weezl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + +[[package]] name = "whoami" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1853,3 +2177,12 @@ dependencies = [ "quote", "syn 2.0.41", ] + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] @@ -24,12 +24,15 @@ colors-transform = "^0" dirs-next = "^2" filetime = "^0" globset = "^0" +image = "0.24.5" lazy_static = "^1" libc = "^0" +lscolors = { version = "0.17.0", features = ["nu-ansi-term"] } notify = "^6" open = "^5" phf = { version = "^0", features = ["macros"], optional = true } rand = "^0" +ratatui-image = { version = "0.8.1", default-features = false, features = ["termion", "rustix", "serde"] } regex = "1.9.3" rustyline = "^12" serde = { version = "^1", features = ["derive"] } @@ -65,6 +68,5 @@ shadow-rs = "0.26" [features] devicons = ["phf"] file_mimetype = [] -mouse = [] syntax_highlight = ["ansi-to-tui"] -default = ["devicons", "mouse", "syntax_highlight"] +default = ["devicons", "syntax_highlight"] diff --git a/config/joshuto.toml b/config/joshuto.toml index b7d4626..d23da09 100644 --- a/config/joshuto.toml +++ b/config/joshuto.toml @@ -1,5 +1,6 @@ numbered_command = false +mouse_support = true focus_on_create = true use_trash = true watch_files = true @@ -23,7 +24,7 @@ show_icons = true # none, absolute, relative line_number_style = "none" -# size, mtime, user, gourp, perm. can be combined with |. +# size, mtime, user, gourp, perm. can be combined with |. # `none` to disable, `all` to enable all # all and none can't be combined with other options linemode = "size" diff --git a/config/mimetype.toml b/config/mimetype.toml index ec2f05d..e9b143a 100644 --- a/config/mimetype.toml +++ b/config/mimetype.toml @@ -3,7 +3,7 @@ audio_default = [ { command = "mpv", args = [ "--", ] }, - { command = "mediainfo", confirm_exit = true }, + { command = "mediainfo", pager = true }, ] image_default = [ @@ -13,7 +13,7 @@ image_default = [ { command = "krita", args = [ "--", ], fork = true, silent = true }, - { command = "exiftool", confirm_exit = true }, + { command = "exiftool", pager = true }, { command = "swappy", args = [ "-f", ], fork = true }, @@ -23,7 +23,7 @@ video_default = [ { command = "mpv", args = [ "--", ], fork = true, silent = true }, - { command = "mediainfo", confirm_exit = true }, + { command = "mediainfo", pager = true }, { command = "mpv", args = [ "--mute", "on", @@ -143,50 +143,56 @@ yml.inherit = "text_default" # archive formats 7z.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "7z", args = [ "x", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] bz2.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "tar", args = [ "-xvjf", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] gz.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "tar", args = [ "-xvzf", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] tar.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "tar", args = [ "-xvf", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] tgz.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "tar", args = [ "-xvzf", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] rar.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "unrar", args = [ "x", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] xz.app_list = [ + { command = "file-roller", fork = true, silent = true }, { command = "tar", args = [ "-xvJf", - ], confirm_exit = true }, - { command = "file-roller", fork = true, silent = true }, + ] }, ] zip.app_list = [ - { command = "unzip", confirm_exit = true }, { command = "file-roller", fork = true, silent = true }, + { command = "unzip" }, +] +zst.app_list = [ + { command = "file-roller", fork = true, silent = true }, + { command = "zstd", args = [ + "-d" + ] }, ] # misc formats @@ -196,7 +202,7 @@ m3u.app_list = [ { command = "micro" }, { command = "mpv" }, { command = "gedit", fork = true, silent = true }, - { command = "bat", confirm_exit = true }, + { command = "bat", pager = true }, ] odt.inherit = "libreoffice_default" @@ -219,7 +225,7 @@ kdenlive.app_list = [{ command = "kdenlive", fork = true, silent = true }] tex.app_list = [ { command = "micro" }, { command = "gedit", fork = true, silent = true }, - { command = "bat", confirm_exit = true }, + { command = "bat", pager = true }, { command = "pdflatex" }, ] diff --git a/config/theme.toml b/config/theme.toml index fce3633..55379f5 100644 --- a/config/theme.toml +++ b/ |