diff --git a/.github/DISCUSSION_TEMPLATE/1-q-a.yml b/.github/DISCUSSION_TEMPLATE/1-q-a.yml
new file mode 100644
index 00000000..6d818615
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/1-q-a.yml
@@ -0,0 +1,54 @@
+body:
+ - type: dropdown
+ id: os
+ attributes:
+ label: What system are you running Yazi on?
+ options:
+ - Linux X11
+ - Linux Wayland
+ - macOS
+ - Windows
+ - Windows WSL
+ - FreeBSD X11
+ - FreeBSD Wayland
+ - Android
+ validations:
+ required: true
+ - type: input
+ id: terminal
+ attributes:
+ label: What terminal are you running Yazi in?
+ placeholder: "ex: kitty v0.32.2"
+ validations:
+ required: true
+ - type: textarea
+ id: debug
+ attributes:
+ label: "`yazi --debug` output"
+ description: Please run `yazi --debug` and paste the debug information here.
+ render: Shell
+ validations:
+ required: true
+ - type: textarea
+ id: description
+ attributes:
+ label: Describe the question
+ description: A clear and concise description of what the question is
+ placeholder: Tell us what you want to know
+ validations:
+ required: true
+ - type: textarea
+ id: other
+ attributes:
+ label: Anything else?
+ description: |
+ Add any other context about the problem here. You can attach screenshots by clicking
+ this area to highlight it and then drag the files in.
+ - type: checkboxes
+ id: validations
+ attributes:
+ label: Validations
+ description: Before submitting the post, please make sure you have completed the following
+ options:
+ - label: I have searched the existing discussions/issues
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index a4a16578..6aeaede8 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -15,6 +15,7 @@ body:
- Windows WSL
- FreeBSD X11
- FreeBSD Wayland
+ - Android
validations:
required: true
- type: input
@@ -32,15 +33,6 @@ body:
render: Shell
validations:
required: true
- - type: dropdown
- id: tried_main
- attributes:
- label: Did you try the latest nightly build to see if the problem got fixed?
- options:
- - Yes, and I updated the debug information above (`yazi --debug`) to the nightly that I tried
- - No, and I'll explain why below
- validations:
- required: true
- type: textarea
id: description
attributes:
@@ -52,7 +44,7 @@ body:
- type: textarea
id: reproducer
attributes:
- label: Minimal reproducer
+ label: Minimal reproducer
description: A [minimal reproducer](https://stackoverflow.com/help/minimal-reproducible-example) is required, otherwise the issue might be closed without further notice.
placeholder: |
Please include as much information as possible that can help to reproduce and understand the issue.
@@ -65,3 +57,14 @@ body:
description: |
Add any other context about the problem here. You can attach screenshots by clicking
this area to highlight it and then drag the files in.
+ - type: checkboxes
+ id: validations
+ attributes:
+ label: Validations
+ description: Before submitting the issue, please make sure you have completed the following
+ options:
+ - label: I tried the [latest nightly build](https://yazi-rs.github.io/docs/installation#official-binaries), and the issue is still reproducible
+ required: true
+ - label: I updated the debug information (`yazi --debug`) input box to the nightly that I tried
+ required: true
+ - label: I can reproduce it after disabling all custom configs/plugins (`mv ~/.config/yazi ~/.config/yazi-backup`)
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 9976ab8a..84145ce7 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -3,9 +3,9 @@ contact_links:
- name: 📝 Documentation Improvement
url: https://github.com/yazi-rs/yazi-rs.github.io
about: If you'd like to help improve the documentation
+ - name: 💬 GitHub Discussions
+ url: https://github.com/sxyazi/yazi/discussions/new?category=1-q-a
+ about: When you have questions that are not bug reports or feature requests
- name: 🌐 Discord Server / Telegram Group
url: https://github.com/sxyazi/yazi#discussion
about: If you'd prefer more realtime conversation with the community
- - name: 💬 GitHub Discussions
- url: https://github.com/sxyazi/yazi/discussions
- about: When you have questions that are not bug reports or feature requests
diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml
index 1ac3a36e..478f0667 100644
--- a/.github/ISSUE_TEMPLATE/feature.yml
+++ b/.github/ISSUE_TEMPLATE/feature.yml
@@ -45,5 +45,5 @@ body:
options:
- label: I have searched the existing issues/discussions
required: true
- - label: The latest nightly build of Yazi doesn't already have this feature
+ - label: The [latest nightly build](https://yazi-rs.github.io/docs/installation/#official-binaries) doesn't already have this feature
required: true
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 0e7b1d54..f9b4bc73 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -19,6 +19,9 @@ jobs:
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ubuntu-latest@debug
- name: Clippy
run: cargo clippy --all
@@ -36,6 +39,9 @@ jobs:
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ubuntu-latest@debug
- name: Rustfmt
run: cargo +nightly fmt --all -- --check
diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml
index f8a3d8b4..977c77cb 100644
--- a/.github/workflows/draft.yml
+++ b/.github/workflows/draft.yml
@@ -32,6 +32,15 @@ jobs:
echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc" >> $GITHUB_ENV
+ - name: Setup Rust toolchain
+ run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
+
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ${{ matrix.target }}@release
+
- name: Build
run: ./scripts/build.sh ${{ matrix.target }}
@@ -54,10 +63,13 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
- run: rustup toolchain install stable --profile minimal
+ run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
- - name: Add target
- run: rustup target add ${{ matrix.target }}
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ${{ matrix.target }}@release
- name: Build
env:
@@ -98,6 +110,15 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Add musl target
+ run: rustup target add ${{ matrix.target }}
+
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ${{ matrix.target }}@release
+
- name: Build
run: ./scripts/build.sh ${{ matrix.target }}
@@ -117,10 +138,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Build snap
- uses: snapcore/action-build@v1
+ - name: Setup Rust cache
+ uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ${{ matrix.target }}@release
- name: Build
+ uses: snapcore/action-build@v1
+
+ - name: Rename snap
run: mv yazi_*.snap yazi-${{ matrix.target }}.snap
- name: Upload artifact
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
index 261c8988..9d0819fe 100644
--- a/.github/workflows/lock.yml
+++ b/.github/workflows/lock.yml
@@ -23,7 +23,7 @@ jobs:
I'm going to lock this issue because it has been closed for _30 days_. ⏳
This helps our maintainers find and focus on the active issues.
- If you have found a problem that seems similar to this, please open a new
+ If you have found a problem that seems similar to this, please file a new
issue and complete the issue template so we can capture all the details
necessary to investigate further.
pr-inactive-days: "30"
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c7296246..d4a15e8a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -23,6 +23,9 @@ jobs:
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
+ with:
+ prefix-key: rust
+ shared-key: ${{ matrix.os }}@debug
- name: Build
run: cargo build --verbose
diff --git a/Cargo.lock b/Cargo.lock
index e2931bf5..43d14dbb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -61,9 +61,9 @@ dependencies = [
[[package]]
name = "ansi-to-tui"
-version = "6.0.0"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00c4af0bef1b514c9b6a32a773caf604c1390fa7913f4eaa23bfe76f251d6a42"
+checksum = "67555e1f1ece39d737e28c8a017721287753af3f93225e4a445b29ccb0f5912c"
dependencies = [
"nom",
"ratatui",
@@ -74,9 +74,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.15"
+version = "0.6.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
+checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -89,43 +89,43 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.8"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
+checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56"
[[package]]
name = "anstyle-parse"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.1.1"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.4"
+version = "3.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
dependencies = [
"anstyle",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anyhow"
-version = "1.0.89"
+version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
+checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
[[package]]
name = "arbitrary"
@@ -133,12 +133,6 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
-[[package]]
-name = "arc-swap"
-version = "1.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
-
[[package]]
name = "arg_enum_proc_macro"
version = "0.3.4"
@@ -147,7 +141,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -187,9 +181,9 @@ dependencies = [
[[package]]
name = "avif-serialize"
-version = "0.8.1"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
+checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62"
dependencies = [
"arrayvec",
]
@@ -288,9 +282,9 @@ dependencies = [
[[package]]
name = "built"
-version = "0.7.4"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4"
+checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b"
[[package]]
name = "bumpalo"
@@ -300,9 +294,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
-version = "1.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae"
+checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d"
[[package]]
name = "byteorder"
@@ -318,9 +312,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
-version = "1.7.2"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3"
+checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
[[package]]
name = "cassowary"
@@ -339,9 +333,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.1.30"
+version = "1.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945"
+checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
dependencies = [
"jobserver",
"libc",
@@ -400,9 +394,9 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "4.5.33"
+version = "4.5.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9646e2e245bf62f45d39a0f3f36f1171ad1ea0d6967fd114bca72cb02a8fcdfb"
+checksum = "07a13ab5b8cb13dbe35e68b83f6c12f9293b2f601797b71bc9f23befdb329feb"
dependencies = [
"clap",
]
@@ -436,7 +430,7 @@ dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -462,9 +456,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
name = "colorchoice"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "compact_str"
@@ -561,7 +555,7 @@ dependencies = [
"filedescriptor",
"futures-core",
"libc",
- "mio 1.0.2",
+ "mio",
"parking_lot",
"rustix",
"signal-hook",
@@ -615,7 +609,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -626,7 +620,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -656,7 +650,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -666,7 +660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
dependencies = [
"derive_builder_core",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -773,9 +767,9 @@ dependencies = [
[[package]]
name = "fdeflate"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab"
+checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb"
dependencies = [
"simd-adler32",
]
@@ -825,9 +819,9 @@ dependencies = [
[[package]]
name = "flume"
-version = "0.11.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
+checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095"
dependencies = [
"spin",
]
@@ -918,7 +912,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1084,9 +1078,9 @@ dependencies = [
[[package]]
name = "image"
-version = "0.25.2"
+version = "0.25.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10"
+checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae"
dependencies = [
"bytemuck",
"byteorder-lite",
@@ -1106,9 +1100,9 @@ dependencies = [
[[package]]
name = "image-webp"
-version = "0.1.3"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904"
+checksum = "e031e8e3d94711a9ccb5d6ea357439ef3dcbed361798bd4071dc4d9793fbe22f"
dependencies = [
"byteorder-lite",
"quick-error",
@@ -1122,9 +1116,9 @@ checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285"
[[package]]
name = "imgref"
-version = "1.10.1"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126"
+checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
[[package]]
name = "indexmap"
@@ -1137,6 +1131,12 @@ dependencies = [
"serde",
]
+[[package]]
+name = "indoc"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
+
[[package]]
name = "inotify"
version = "0.10.2"
@@ -1164,7 +1164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c"
dependencies = [
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1184,7 +1184,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1235,15 +1235,6 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "kamadak-exif"
-version = "0.5.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077"
-dependencies = [
- "mutate_once",
-]
-
[[package]]
name = "kqueue"
version = "1.0.8"
@@ -1278,9 +1269,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "libc"
-version = "0.2.159"
+version = "0.2.161"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
+checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
[[package]]
name = "libfuzzer-sys"
@@ -1413,18 +1404,6 @@ dependencies = [
"simd-adler32",
]
-[[package]]
-name = "mio"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
-dependencies = [
- "libc",
- "log",
- "wasi",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "mio"
version = "1.0.2"
@@ -1458,9 +1437,9 @@ dependencies = [
[[package]]
name = "mlua-sys"
-version = "0.6.3"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebe026d6bd1583a9cf9080e189030ddaea7e6f5f0deb366a8e26f8a26c4135b8"
+checksum = "e9eebac25c35a13285456c88ee2fde93d9aee8bcfdaf03f9d6d12be3391351ec"
dependencies = [
"cc",
"cfg-if",
@@ -1481,15 +1460,9 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.79",
+ "syn 2.0.85",
]
-[[package]]
-name = "mutate_once"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b"
-
[[package]]
name = "new_debug_unreachable"
version = "1.0.6"
@@ -1513,10 +1486,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
[[package]]
-name = "notify-fork"
-version = "6.1.1"
+name = "notify"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f610737468f7a95610d2b320b5d5e246b3cd1c3603782680c0f454ac5825b64b"
+checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009"
dependencies = [
"bitflags 2.6.0",
"filetime",
@@ -1525,17 +1498,17 @@ dependencies = [
"kqueue",
"libc",
"log",
- "mio 0.8.11",
- "notify-types-fork",
+ "mio",
+ "notify-types",
"walkdir",
"windows-sys 0.52.0",
]
[[package]]
-name = "notify-types-fork"
+name = "notify-types"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcc01866a421a4ce1eddc764da8a95b30b82aa0d9d7f33508265c196d4863b18"
+checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df"
dependencies = [
"instant",
]
@@ -1574,7 +1547,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1750,9 +1723,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pin-project-lite"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "pin-utils"
@@ -1833,30 +1806,30 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.87"
+version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
+checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [
"unicode-ident",
]
[[package]]
name = "profiling"
-version = "1.0.15"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"
+checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
dependencies = [
"profiling-procmacros",
]
[[package]]
name = "profiling-procmacros"
-version = "1.0.15"
+version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
+checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
dependencies = [
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -1924,23 +1897,23 @@ dependencies = [
[[package]]
name = "ratatui"
-version = "0.28.1"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d"
+checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
dependencies = [
"bitflags 2.6.0",
"cassowary",
"compact_str",
"crossterm",
+ "indoc",
"instability",
"itertools 0.13.0",
"lru",
"paste",
"strum",
- "strum_macros",
"unicode-segmentation",
"unicode-truncate",
- "unicode-width",
+ "unicode-width 0.2.0",
]
[[package]]
@@ -1980,9 +1953,9 @@ dependencies = [
[[package]]
name = "ravif"
-version = "0.11.10"
+version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f0bfd976333248de2078d350bfdf182ff96e168a24d23d2436cef320dd4bdd"
+checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6"
dependencies = [
"avif-serialize",
"imgref",
@@ -2034,9 +2007,9 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.11.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
@@ -2066,9 +2039,6 @@ name = "rgb"
version = "0.8.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
-dependencies = [
- "bytemuck",
-]
[[package]]
name = "rustc-demangle"
@@ -2084,9 +2054,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]]
name = "rustix"
-version = "0.38.37"
+version = "0.38.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811"
+checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a"
dependencies = [
"bitflags 2.6.0",
"errno",
@@ -2097,9 +2067,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.17"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
[[package]]
name = "ryu"
@@ -2124,9 +2094,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
+checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
dependencies = [
"serde_derive",
]
@@ -2143,20 +2113,20 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
+checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
name = "serde_json"
-version = "1.0.128"
+version = "1.0.132"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
+checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
dependencies = [
"itoa",
"memchr",
@@ -2211,7 +2181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd"
dependencies = [
"libc",
- "mio 1.0.2",
+ "mio",
"signal-hook",
]
@@ -2322,7 +2292,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2337,9 +2307,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.79"
+version = "2.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
+checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
dependencies = [
"proc-macro2",
"quote",
@@ -2388,22 +2358,22 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "thiserror"
-version = "1.0.64"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84"
+checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.64"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3"
+checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2486,14 +2456,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.40.0"
+version = "1.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
dependencies = [
"backtrace",
"bytes",
"libc",
- "mio 1.0.2",
+ "mio",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
@@ -2510,7 +2480,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2603,7 +2573,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2643,9 +2613,9 @@ dependencies = [
[[package]]
name = "trash"
-version = "5.1.1"
+version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33caf2a9be1812a263a4bfce74d2de225fcde12ee7b77001361abd2b34ffdcc4"
+checksum = "defe1fdd4232e407b312377885a2c5396764972bddad87baf304753374a1bfc8"
dependencies = [
"chrono",
"libc",
@@ -2705,7 +2675,7 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
dependencies = [
"itertools 0.13.0",
"unicode-segmentation",
- "unicode-width",
+ "unicode-width 0.1.14",
]
[[package]]
@@ -2714,6 +2684,12 @@ version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
+[[package]]
+name = "unicode-width"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
+
[[package]]
name = "url"
version = "2.5.2"
@@ -2785,7 +2761,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -2882,7 +2858,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"wasm-bindgen-shared",
]
@@ -2904,7 +2880,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -3003,7 +2979,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3014,7 +2990,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3195,14 +3171,12 @@ version = "0.3.3"
dependencies = [
"ansi-to-tui",
"anyhow",
- "arc-swap",
"base64",
"color_quant",
"crossterm",
"futures",
"image",
"imagesize",
- "kamadak-exif",
"ratatui",
"scopeguard",
"tokio",
@@ -3255,7 +3229,7 @@ name = "yazi-codegen"
version = "0.3.3"
dependencies = [
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
@@ -3263,7 +3237,6 @@ name = "yazi-config"
version = "0.3.3"
dependencies = [
"anyhow",
- "arc-swap",
"bitflags 2.6.0",
"crossterm",
"globset",
@@ -3287,7 +3260,7 @@ dependencies = [
"dirs",
"futures",
"libc",
- "notify-fork",
+ "notify",
"parking_lot",
"ratatui",
"scopeguard",
@@ -3296,7 +3269,7 @@ dependencies = [
"tokio-stream",
"tokio-util",
"tracing",
- "unicode-width",
+ "unicode-width 0.2.0",
"yazi-adapter",
"yazi-boot",
"yazi-codegen",
@@ -3403,7 +3376,7 @@ dependencies = [
"tokio-stream",
"tokio-util",
"tracing",
- "unicode-width",
+ "unicode-width 0.2.0",
"uzers",
"yazi-adapter",
"yazi-boot",
@@ -3495,7 +3468,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.79",
+ "syn 2.0.85",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index b56b104c..e5125f71 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,9 +10,8 @@ panic = "abort"
strip = true
[workspace.dependencies]
-ansi-to-tui = "6.0.0"
-anyhow = "1.0.89"
-arc-swap = "1.7.1"
+ansi-to-tui = "7.0.0"
+anyhow = "1.0.91"
base64 = "0.22.1"
bitflags = "2.6.0"
clap = { version = "4.5.20", features = [ "derive" ] }
@@ -20,19 +19,19 @@ crossterm = { version = "0.28.1", features = [ "event-stream" ] }
dirs = "5.0.1"
futures = "0.3.31"
globset = "0.4.15"
-libc = "0.2.159"
+libc = "0.2.161"
md-5 = "0.10.6"
mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] }
parking_lot = "0.12.3"
-ratatui = { version = "0.28.1", features = [ "unstable-rendered-line-info" ] }
-regex = "1.11.0"
+ratatui = { version = "0.29.0", features = [ "unstable-rendered-line-info" ] }
+regex = "1.11.1"
scopeguard = "1.2.0"
-serde = { version = "1.0.210", features = [ "derive" ] }
-serde_json = "1.0.128"
+serde = { version = "1.0.213", features = [ "derive" ] }
+serde_json = "1.0.132"
shell-words = "1.1.0"
-tokio = { version = "1.40.0", features = [ "full" ] }
+tokio = { version = "1.41.0", features = [ "full" ] }
tokio-stream = "0.1.16"
tokio-util = "0.7.12"
tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] }
-unicode-width = "0.1.14"
+unicode-width = "0.2.0"
uzers = "0.12.1"
diff --git a/README.md b/README.md
index 5ae75e2e..01478be2 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
For breaking changes, see [Migrating to Yazi v0.4.0](https://github.com/sxyazi/yazi/issues/1772).
+
+
@@ -42,26 +44,40 @@ https://github.com/sxyazi/yazi/assets/17523360/92ff23fa-0cd5-4f04-b387-894c12265
## Image Preview
-| Platform | Protocol | Support |
-| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
-| [kitty](https://github.com/kovidgoyal/kitty) | [Kitty unicode placeholders](https://sw.kovidgoyal.net/kitty/graphics-protocol/#unicode-placeholders) | ✅ Built-in |
-| [Konsole](https://invent.kde.org/utilities/konsole) | [Kitty old protocol](https://github.com/sxyazi/yazi/blob/main/yazi-adapter/src/kgp_old.rs) | ✅ Built-in |
-| [iTerm2](https://iterm2.com) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [WezTerm](https://github.com/wez/wezterm) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [Mintty](https://github.com/mintty/mintty) (Git Bash) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [foot](https://codeberg.org/dnkl/foot) | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | ✅ Built-in |
-| [Ghostty](https://mitchellh.com/ghostty) | [Kitty unicode placeholders](https://sw.kovidgoyal.net/kitty/graphics-protocol/#unicode-placeholders) | ✅ Built-in |
-| [Windows Terminal](https://github.com/microsoft/terminal) (>= v1.22.2702.0) | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | ✅ Built-in |
-| [Black Box](https://gitlab.gnome.org/raggesilver/blackbox) | [Sixel graphics format](https://www.vt100.net/docs/vt3xx-gp/chapter14.html) | ✅ Built-in |
-| [VSCode](https://github.com/microsoft/vscode) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [Tabby](https://github.com/Eugeny/tabby) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [Hyper](https://github.com/vercel/hyper) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| [Rio](https://github.com/raphamorim/rio) | [Inline images protocol](https://iterm2.com/documentation-images.html) | ✅ Built-in |
-| X11 / Wayland | Window system protocol | ☑️ [Überzug++](https://github.com/jstkdng/ueberzugpp) required |
-| Fallback | [ASCII art (Unicode block)](https://en.wikipedia.org/wiki/ASCII_art) | ☑️ [Chafa](https://hpjansson.org/chafa/) required |
+| Platform | Protocol | Support |
+| --------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------- |
+| [kitty](https://github.com/kovidgoyal/kitty) | [Kitty unicode placeholders][kgp] | ✅ Built-in |
+| [iTerm2](https://iterm2.com) | [Inline images protocol][iip] | ✅ Built-in |
+| [WezTerm](https://github.com/wez/wezterm) | [Inline images protocol][iip] | ✅ Built-in |
+| [Konsole](https://invent.kde.org/utilities/konsole) | [Kitty old protocol][kgp-old] | ✅ Built-in |
+| [foot](https://codeberg.org/dnkl/foot) | [Sixel graphics format][sixel] | ✅ Built-in |
+| [Ghostty](https://mitchellh.com/ghostty) | [Kitty unicode placeholders][kgp] | ✅ Built-in |
+| [Windows Terminal](https://github.com/microsoft/terminal) (>= v1.22.2702.0) | [Sixel graphics format][sixel] | ✅ Built-in |
+| [st with Sixel patch](https://github.com/bakkeby/st-flexipatch) | [Sixel graphics format][sixel] | ✅ Built-in |
+| [Tabby](https://github.com/Eugeny/tabby) | [Inline images protocol][iip] | ✅ Built-in |
+| [VSCode](https://github.com/microsoft/vscode) | [Inline images protocol][iip] | ✅ Built-in |
+| [Rio](https://github.com/raphamorim/rio) | [Inline images protocol][iip] | ❌ Rio doesn't correctly clear images (#1786) |
+| [Mintty](https://github.com/mintty/mintty) (Git Bash) | [Inline images protocol][iip] | ✅ Built-in |
+| [Black Box](https://gitlab.gnome.org/raggesilver/blackbox) | [Sixel graphics format][sixel] | ✅ Built-in |
+| [Hyper](https://github.com/vercel/hyper) | [Inline images protocol][iip] | ✅ Built-in |
+| X11 / Wayland | Window system protocol | ☑️ [Überzug++][ueberzug] required |
+| Fallback | [ASCII art (Unicode block)][ascii-art] | ☑️ [Chafa][chafa] required |
See https://yazi-rs.github.io/docs/image-preview for details.
+
+
+[kgp]: https://sw.kovidgoyal.net/kitty/graphics-protocol/#unicode-placeholders
+[kgp-old]: https://github.com/sxyazi/yazi/blob/main/yazi-adapter/src/kgp_old.rs
+[iip]: https://iterm2.com/documentation-images.html
+[sixel]: https://www.vt100.net/docs/vt3xx-gp/chapter14.html
+[ascii-art]: https://en.wikipedia.org/wiki/ASCII_art
+
+
+
+[ueberzug]: https://github.com/jstkdng/ueberzugpp
+[chafa]: https://hpjansson.org/chafa/
+
## License
Yazi is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
diff --git a/cspell.json b/cspell.json
index 8863c4db..c9ca6db9 100644
--- a/cspell.json
+++ b/cspell.json
@@ -1 +1 @@
-{"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","️ Überzug","️ Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname"],"flagWords":[],"version":"0.2","language":"en"}
\ No newline at end of file
+{"flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","unar","peekable","ratatui","syntect","pbpaste","pbcopy","ffmpegthumbnailer","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","nvim","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","️ Überzug","️ Überzug","Konsole","Alacritty","Überzug","pkgs","paru","unarchiver","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","imagesize","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname","fchmod"],"version":"0.2","language":"en"}
\ No newline at end of file
diff --git a/flake.lock b/flake.lock
index 633586e6..0ce60016 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,83 +1,80 @@
{
- "nodes": {
- "flake-utils": {
- "inputs": {
- "systems": "systems"
- },
- "locked": {
- "lastModified": 1710146030,
- "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
- "nixpkgs": {
- "locked": {
- "lastModified": 1722415718,
- "narHash": "sha256-5US0/pgxbMksF92k1+eOa8arJTJiPvsdZj9Dl+vJkM4=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "c3392ad349a5227f4a3464dce87bcc5046692fce",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixpkgs-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "root": {
- "inputs": {
- "flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs",
- "rust-overlay": "rust-overlay"
- }
- },
- "rust-overlay": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ]
- },
- "locked": {
- "lastModified": 1721441897,
- "narHash": "sha256-gYGX9/22tPNeF7dR6bWN5rsrpU4d06GnQNNgZ6ZiXz0=",
- "owner": "oxalica",
- "repo": "rust-overlay",
- "rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd",
- "type": "github"
- },
- "original": {
- "owner": "oxalica",
- "repo": "rust-overlay",
- "rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd",
- "type": "github"
- }
- },
- "systems": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
- }
- },
- "root": "root",
- "version": 7
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1726560853,
+ "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1729265718,
+ "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs",
+ "rust-overlay": "rust-overlay"
+ }
+ },
+ "rust-overlay": {
+ "inputs": {
+ "nixpkgs": ["nixpkgs"]
+ },
+ "locked": {
+ "lastModified": 1729391507,
+ "narHash": "sha256-as0I9xieJUHf7kiK2a9znDsVZQTFWhM1pLivII43Gi0=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "784981a9feeba406de38c1c9a3decf966d853cca",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
}
diff --git a/flake.nix b/flake.nix
index 63132be4..c6a11b0a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,7 +3,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
- url = "github:oxalica/rust-overlay/b7996075da11a2d441cfbf4e77c2939ce51506fd"; # FIX: pin to a specific commit until cargo-c is updated
+ url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
diff --git a/scripts/build.sh b/scripts/build.sh
index a1e70be6..5c473c96 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -5,13 +5,6 @@ export ARTIFACT_NAME="yazi-$1"
export YAZI_GEN_COMPLETIONS=1
export MACOSX_DEPLOYMENT_TARGET="10.11"
-# Setup Rust toolchain
-if [[ "$1" == *-musl ]]; then
- rustup target add "$1"
-else
- rustup toolchain install stable --profile minimal --target "$1"
-fi
-
# Build for the target
cargo build --release --locked --target "$1"
diff --git a/yazi-adapter/Cargo.toml b/yazi-adapter/Cargo.toml
index b32ec22a..a6fcd1b9 100644
--- a/yazi-adapter/Cargo.toml
+++ b/yazi-adapter/Cargo.toml
@@ -14,20 +14,18 @@ yazi-macro = { path = "../yazi-macro", version = "0.3.3" }
yazi-shared = { path = "../yazi-shared", version = "0.3.3" }
# External dependencies
-ansi-to-tui = { workspace = true }
-anyhow = { workspace = true }
-arc-swap = { workspace = true }
-base64 = { workspace = true }
-color_quant = "1.1.0"
-crossterm = { workspace = true }
-futures = { workspace = true }
-image = { version = "0.25.2", default-features = false, features = [ "rayon", "avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "webp" ] }
-imagesize = "0.13.0"
-kamadak-exif = "0.5.5"
-ratatui = { workspace = true }
-scopeguard = { workspace = true }
-tokio = { workspace = true }
-tracing = { workspace = true }
+ansi-to-tui = { workspace = true }
+anyhow = { workspace = true }
+base64 = { workspace = true }
+color_quant = "1.1.0"
+crossterm = { workspace = true }
+futures = { workspace = true }
+image = { version = "0.25.4", default-features = false, features = [ "rayon", "avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "webp" ] }
+imagesize = "0.13.0"
+ratatui = { workspace = true }
+scopeguard = { workspace = true }
+tokio = { workspace = true }
+tracing = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { workspace = true, features = [ "use-dev-tty", "libc" ] }
diff --git a/yazi-adapter/src/adapter.rs b/yazi-adapter/src/adapter.rs
index 841effe8..7f281234 100644
--- a/yazi-adapter/src/adapter.rs
+++ b/yazi-adapter/src/adapter.rs
@@ -1,4 +1,4 @@
-use std::{env, fmt::Display, path::Path, sync::Arc};
+use std::{env, fmt::Display, path::Path};
use anyhow::Result;
use ratatui::layout::Rect;
@@ -52,7 +52,7 @@ impl Adapter {
}
pub fn image_hide(self) -> Result<()> {
- if let Some(area) = SHOWN.swap(None) { self.image_erase(*area) } else { Ok(()) }
+ if let Some(area) = SHOWN.replace(None) { self.image_erase(area) } else { Ok(()) }
}
pub fn image_erase(self, area: Rect) -> Result<()> {
@@ -67,10 +67,10 @@ impl Adapter {
}
#[inline]
- pub fn shown_load(self) -> Option { SHOWN.load_full().map(|r| *r) }
+ pub fn shown_load(self) -> Option { SHOWN.get() }
#[inline]
- pub(super) fn shown_store(area: Rect) { SHOWN.store(Some(Arc::new(area))); }
+ pub(super) fn shown_store(area: Rect) { SHOWN.set(Some(area)); }
pub(super) fn start(self) { Ueberzug::start(self); }
diff --git a/yazi-adapter/src/image.rs b/yazi-adapter/src/image.rs
index a858ac82..a2ba06e4 100644
--- a/yazi-adapter/src/image.rs
+++ b/yazi-adapter/src/image.rs
@@ -1,8 +1,7 @@
-use std::{fs::File, io::BufReader, path::{Path, PathBuf}};
+use std::path::{Path, PathBuf};
use anyhow::Result;
-use exif::{In, Tag};
-use image::{DynamicImage, ExtendedColorType, ImageEncoder, ImageError, Limits, codecs::{jpeg::JpegEncoder, png::PngEncoder}, imageops::{self, FilterType}};
+use image::{DynamicImage, ExtendedColorType, ImageDecoder, ImageEncoder, ImageError, ImageReader, ImageResult, Limits, codecs::{jpeg::JpegEncoder, png::PngEncoder}, imageops::FilterType, metadata::Orientation};
use ratatui::layout::Rect;
use yazi_config::{PREVIEW, TASKS};
@@ -12,38 +11,27 @@ pub struct Image;
impl Image {
pub async fn precache(path: &Path, cache: PathBuf) -> Result<()> {
- let orientation = Self::orientation(path).await?;
-
- let path = path.to_owned();
- let mut img = tokio::task::spawn_blocking(move || {
- Self::set_limits(image::ImageReader::open(path)?.with_guessed_format()?).decode()
- })
- .await??;
-
- let (mut w, mut h) = (PREVIEW.max_width, PREVIEW.max_height);
- if (5..=8).contains(&orientation) {
- (w, h) = (h, w);
- }
+ let (mut img, orientation, icc) = Self::decode_from(path).await?;
+ let (w, h) = Self::flip_size(orientation, (PREVIEW.max_width, PREVIEW.max_height));
let buf = tokio::task::spawn_blocking(move || {
if img.width() > w || img.height() > h {
img = img.resize(w, h, Self::filter());
}
+ if orientation != Orientation::NoTransforms {
+ img.apply_orientation(orientation);
+ }
let mut buf = Vec::new();
- img = Self::rotate(img, orientation);
-
if img.color().has_alpha() {
let rgba = img.into_rgba8();
- PngEncoder::new(&mut buf).write_image(
- &rgba,
- rgba.width(),
- rgba.height(),
- ExtendedColorType::Rgba8,
- )?;
+ let mut encoder = PngEncoder::new(&mut buf);
+ icc.map(|b| encoder.set_icc_profile(b));
+ encoder.write_image(&rgba, rgba.width(), rgba.height(), ExtendedColorType::Rgba8)?;
} else {
- JpegEncoder::new_with_quality(&mut buf, PREVIEW.image_quality)
- .encode_image(&img.into_rgb8())?;
+ let mut encoder = JpegEncoder::new_with_quality(&mut buf, PREVIEW.image_quality);
+ icc.map(|b| encoder.set_icc_profile(b));
+ encoder.encode_image(&img.into_rgb8())?;
}
Ok::<_, ImageError>(buf)
@@ -54,31 +42,26 @@ impl Image {
}
pub(super) async fn downscale(path: &Path, rect: Rect) -> Result {
- let orientation = Self::orientation(path).await?;
-
- let path = path.to_owned();
- let mut img = tokio::task::spawn_blocking(move || {
- Self::set_limits(image::ImageReader::open(path)?.with_guessed_format()?).decode()
- })
- .await??;
-
- let (mut w, mut h) = Self::max_pixel(rect);
- if (5..=8).contains(&orientation) {
- (w, h) = (h, w);
- }
+ let (mut img, orientation, _) = Self::decode_from(path).await?;
+ let (w, h) = Self::flip_size(orientation, Self::max_pixel(rect));
// Fast path.
- if img.width() <= w && img.height() <= h && orientation <= 1 {
+ if img.width() <= w && img.height() <= h && orientation == Orientation::NoTransforms {
return Ok(img);
}
- tokio::task::spawn_blocking(move || {
+ let img = tokio::task::spawn_blocking(move || {
if img.width() > w || img.height() > h {
img = img.resize(w, h, Self::filter())
}
- Ok(Self::rotate(img, orientation))
+ if orientation != Orientation::NoTransforms {
+ img.apply_orientation(orientation);
+ }
+ img
})
- .await?
+ .await?;
+
+ Ok(img)
}
pub(super) fn max_pixel(rect: Rect) -> (u32, u32) {
@@ -113,53 +96,7 @@ impl Image {
}
}
- async fn orientation(path: &Path) -> Result {
- // We don't want to read the orientation of the cached image that has been
- // rotated in the `Self::precache()` step.
- if path.parent() == Some(&PREVIEW.cache_dir) {
- return Ok(0);
- }
-
- let path = path.to_owned();
- tokio::task::spawn_blocking(move || {
- let file = std::fs::File::open(path)?;
-
- let mut reader = std::io::BufReader::new(&file);
- let Ok(exif) = exif::Reader::new().read_from_container(&mut reader) else {
- return Ok(0);
- };
-
- Ok(match exif.get_field(Tag::Orientation, In::PRIMARY) {
- Some(orientation) => match orientation.value.get_uint(0) {
- Some(v @ 1..=8) => v as u8,
- _ => 1,
- },
- None => 1,
- })
- })
- .await?
- }
-
- // https://magnushoff.com/articles/jpeg-orientation/
- fn rotate(mut img: DynamicImage, orientation: u8) -> DynamicImage {
- let alpha = img.color().has_alpha();
- img = match orientation {
- 2 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&img)),
- 3 => DynamicImage::ImageRgba8(imageops::rotate180(&img)),
- 4 => DynamicImage::ImageRgba8(imageops::flip_vertical(&img)),
- 5 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&imageops::rotate90(&img))),
- 6 => DynamicImage::ImageRgba8(imageops::rotate90(&img)),
- 7 => DynamicImage::ImageRgba8(imageops::flip_horizontal(&imageops::rotate270(&img))),
- 8 => DynamicImage::ImageRgba8(imageops::rotate270(&img)),
- _ => img,
- };
- if !alpha {
- img = DynamicImage::ImageRgb8(img.into_rgb8());
- }
- img
- }
-
- fn set_limits(mut r: image::ImageReader>) -> image::ImageReader> {
+ async fn decode_from(path: &Path) -> ImageResult<(DynamicImage, Orientation, Option>)> {
let mut limits = Limits::no_limits();
if TASKS.image_alloc > 0 {
limits.max_alloc = Some(TASKS.image_alloc as u64);
@@ -170,7 +107,27 @@ impl Image {
if TASKS.image_bound[1] > 0 {
limits.max_image_height = Some(TASKS.image_bound[1] as u32);
}
- r.limits(limits);
- r
+
+ let path = path.to_owned();
+ tokio::task::spawn_blocking(move || {
+ let mut reader = ImageReader::open(path)?;
+ reader.limits(limits);
+
+ let mut decoder = reader.with_guessed_format()?.into_decoder()?;
+ let orientation = decoder.orientation().unwrap_or(Orientation::NoTransforms);
+ let icc = decoder.icc_profile().unwrap_or_default();
+
+ Ok((DynamicImage::from_decoder(decoder)?, orientation, icc))
+ })
+ .await
+ .map_err(|e| ImageError::IoError(e.into()))?
+ }
+
+ fn flip_size(orientation: Orientation, (w, h): (u32, u32)) -> (u32, u32) {
+ use image::metadata::Orientation::{Rotate90, Rotate90FlipH, Rotate270, Rotate270FlipH};
+ match orientation {
+ Rotate90 | Rotate270 | Rotate90FlipH | Rotate270FlipH => (h, w),
+ _ => (w, h),
+ }
}
}
diff --git a/yazi-adapter/src/lib.rs b/yazi-adapter/src/lib.rs
index 8999cec5..a9879185 100644
--- a/yazi-adapter/src/lib.rs
+++ b/yazi-adapter/src/lib.rs
@@ -4,7 +4,7 @@ yazi_macro::mod_flat!(
adapter chafa dimension emulator iip image kgp kgp_old mux sixel ueberzug
);
-use yazi_shared::{RoCell, env_exists, in_wsl};
+use yazi_shared::{RoCell, SyncCell, env_exists, in_wsl};
pub static ADAPTOR: RoCell = RoCell::new();
// Tmux support
@@ -17,7 +17,7 @@ static CLOSE: RoCell<&'static str> = RoCell::new();
pub static WSL: RoCell = RoCell::new();
// Image state
-static SHOWN: RoCell> = RoCell::new();
+static SHOWN: SyncCell