mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
feat!: new ind-app-title DDS event to customize the app title (#3684)
This commit is contained in:
parent
c3bc4fecad
commit
13bdb164a4
36 changed files with 214 additions and 166 deletions
|
|
@ -14,10 +14,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
|||
|
||||
### Added
|
||||
|
||||
- New `fs.access()` API to access the filesystem ([#3668])
|
||||
- Allow using `ps.sub()` in `init.lua` directly without a plugin ([#3638])
|
||||
- New `relay-notify-push` DDS event to allow custom notification handlers ([#3642])
|
||||
- Custom tab name ([#3666])
|
||||
- Allow using `ps.sub()` in `init.lua` directly without a plugin ([#3638])
|
||||
- New `fs.access()` API to access the filesystem ([#3668])
|
||||
- New `relay-notify-push` DDS event to allow custom notification handlers ([#3642])
|
||||
- New `ind-app-title` DDS event to customize the app title ([#3684])
|
||||
- New `fs.unique()` creates a unique file or directory ([#3677])
|
||||
- New `cx.which` API to access the which component state ([#3617])
|
||||
- New `ind-which-activate` DDS event to change the which component behavior ([#3608])
|
||||
|
|
@ -26,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
|||
|
||||
- Upgrade Lua to 5.5 ([#3633])
|
||||
- Change preset <kbd>t</kbd> for creating tabs to <kbd>t</kbd> ⇒ <kbd>t</kbd> to avoid conflict with new <kbd>t</kbd> ⇒ <kbd>r</kbd> for renaming tabs ([#3666])
|
||||
- Remove `title_format` in favor of new `ind-app-title` DDS event for flexible title customization ([#3684])
|
||||
- Remove `micro_workers` and `macro_workers` in favor of finer control over concurrent workers ([#3661])
|
||||
|
||||
### Deprecated
|
||||
|
|
@ -1655,3 +1657,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
|||
[#3668]: https://github.com/sxyazi/yazi/pull/3668
|
||||
[#3677]: https://github.com/sxyazi/yazi/pull/3677
|
||||
[#3678]: https://github.com/sxyazi/yazi/pull/3678
|
||||
[#3684]: https://github.com/sxyazi/yazi/pull/3684
|
||||
|
|
|
|||
160
Cargo.lock
generated
160
Cargo.lock
generated
|
|
@ -186,7 +186,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -500,7 +500,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -600,9 +600,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.57"
|
||||
version = "4.5.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
|
||||
checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
|
|
@ -610,9 +610,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.57"
|
||||
version = "4.5.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
|
||||
checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
|
|
@ -622,9 +622,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap_complete"
|
||||
version = "4.5.65"
|
||||
version = "4.5.66"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5d"
|
||||
checksum = "c757a3b7e39161a4e56f9365141ada2a6c915a8622c408ab6bb4b5d047371031"
|
||||
dependencies = [
|
||||
"clap",
|
||||
]
|
||||
|
|
@ -658,14 +658,14 @@ dependencies = [
|
|||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.7.7"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
|
||||
checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
|
||||
|
||||
[[package]]
|
||||
name = "clipboard-win"
|
||||
|
|
@ -990,7 +990,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1034,7 +1034,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1048,7 +1048,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1061,7 +1061,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1072,7 +1072,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
|
|||
dependencies = [
|
||||
"darling_core 0.20.11",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1083,7 +1083,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
|
|||
dependencies = [
|
||||
"darling_core 0.21.3",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1094,7 +1094,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
|
|||
dependencies = [
|
||||
"darling_core 0.23.0",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1132,7 +1132,7 @@ checksum = "780eb241654bf097afb00fc5f054a09b687dad862e485fdcf8399bb056565370"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1154,9 +1154,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "der"
|
||||
version = "0.8.0-rc.10"
|
||||
version = "0.8.0-rc.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02c1d73e9668ea6b6a28172aa55f3ebec38507131ce179051c8033b5c6037653"
|
||||
checksum = "6c0182be35043efdd2df327a443bb600606e350cfb090cccb233e9451e76f5a3"
|
||||
dependencies = [
|
||||
"const-oid 0.10.2",
|
||||
"pem-rfc7468 1.0.0",
|
||||
|
|
@ -1165,9 +1165,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.5.5"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
|
||||
checksum = "cc3dc5ad92c2e2d1c193bbbbdf2ea477cb81331de4f3103f267ca18368b988c4"
|
||||
dependencies = [
|
||||
"powerfmt",
|
||||
"serde_core",
|
||||
|
|
@ -1191,7 +1191,7 @@ dependencies = [
|
|||
"darling 0.20.11",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1201,7 +1201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
|
||||
dependencies = [
|
||||
"derive_builder_core",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1223,7 +1223,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"rustc_version",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1240,9 +1240,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.11.0-rc.11"
|
||||
version = "0.11.0-rc.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "02b42f1d9edf5207c137646b568a0168ca0ec25b7f9eaf7f9961da51a3d91cea"
|
||||
checksum = "d4b37eb2004a3548553a44cc1e688aac70f0345b896c9d822b4a0e520bc9183b"
|
||||
dependencies = [
|
||||
"block-buffer 0.11.0",
|
||||
"const-oid 0.10.2",
|
||||
|
|
@ -1366,7 +1366,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1392,7 +1392,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1495,7 +1495,7 @@ checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1655,7 +1655,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1836,7 +1836,7 @@ dependencies = [
|
|||
"proc-macro-error2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2053,7 +2053,7 @@ dependencies = [
|
|||
"indoc",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2064,7 +2064,7 @@ checksum = "fe44f2bbd99fcb302e246e2d6bcf51aeda346d02a365f80296a07a8c711b6da6"
|
|||
dependencies = [
|
||||
"argon2",
|
||||
"bcrypt-pbkdf",
|
||||
"digest 0.11.0-rc.11",
|
||||
"digest 0.11.0-rc.12",
|
||||
"ecdsa",
|
||||
"ed25519-dalek",
|
||||
"hex",
|
||||
|
|
@ -2095,7 +2095,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2499,7 +2499,7 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2643,7 +2643,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2899,7 +2899,7 @@ dependencies = [
|
|||
"by_address",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3018,7 +3018,7 @@ dependencies = [
|
|||
"pest_meta",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3071,7 +3071,7 @@ dependencies = [
|
|||
"phf_shared",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3101,7 +3101,7 @@ version = "0.8.0-rc.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e"
|
||||
dependencies = [
|
||||
"der 0.8.0-rc.10",
|
||||
"der 0.8.0-rc.12",
|
||||
"spki 0.8.0-rc.4",
|
||||
]
|
||||
|
||||
|
|
@ -3134,11 +3134,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pkcs8"
|
||||
version = "0.11.0-rc.10"
|
||||
version = "0.11.0-rc.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b226d2cc389763951db8869584fd800cbbe2962bf454e2edeb5172b31ee99774"
|
||||
checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577"
|
||||
dependencies = [
|
||||
"der 0.8.0-rc.10",
|
||||
"der 0.8.0-rc.12",
|
||||
"spki 0.8.0-rc.4",
|
||||
]
|
||||
|
||||
|
|
@ -3246,7 +3246,7 @@ dependencies = [
|
|||
"proc-macro-error-attr2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3274,7 +3274,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3621,7 +3621,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3692,9 +3692,9 @@ dependencies = [
|
|||
"const-oid 0.10.2",
|
||||
"crypto-bigint 0.7.0-rc.18",
|
||||
"crypto-primes",
|
||||
"digest 0.11.0-rc.11",
|
||||
"digest 0.11.0-rc.12",
|
||||
"pkcs1",
|
||||
"pkcs8 0.11.0-rc.10",
|
||||
"pkcs8 0.11.0-rc.11",
|
||||
"rand_core 0.10.0-rc-3",
|
||||
"sha2 0.11.0-rc.5",
|
||||
"signature 3.0.0-rc.6",
|
||||
|
|
@ -3972,7 +3972,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4025,7 +4025,7 @@ dependencies = [
|
|||
"darling 0.21.3",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4057,7 +4057,7 @@ checksum = "3b167252f3c126be0d8926639c4c4706950f01445900c4b3db0fd7e89fcb750a"
|
|||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest 0.11.0-rc.11",
|
||||
"digest 0.11.0-rc.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4079,7 +4079,7 @@ checksum = "7c5f3b1e2dc8aad28310d8410bd4d7e180eca65fca176c52ab00d364475d0024"
|
|||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest 0.11.0-rc.11",
|
||||
"digest 0.11.0-rc.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4166,7 +4166,7 @@ version = "3.0.0-rc.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "597a96996ccff7dfa16f052bd995b4cecc72af22c35138738dc029f0ead6608d"
|
||||
dependencies = [
|
||||
"digest 0.11.0-rc.11",
|
||||
"digest 0.11.0-rc.12",
|
||||
"rand_core 0.10.0-rc-3",
|
||||
]
|
||||
|
||||
|
|
@ -4242,7 +4242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "8baeff88f34ed0691978ec34440140e1572b68c7dd4a495fd14a3dc1944daa80"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"der 0.8.0-rc.10",
|
||||
"der 0.8.0-rc.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4310,7 +4310,7 @@ dependencies = [
|
|||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4332,9 +4332,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.114"
|
||||
version = "2.0.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
||||
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -4468,7 +4468,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4479,7 +4479,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4576,7 +4576,7 @@ checksum = "2d2e76690929402faae40aebdda620a2c0e25dd6d3b9afe48867dfd95991f4bd"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4604,7 +4604,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4633,9 +4633,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.9.12+spec-1.1.0"
|
||||
version = "1.0.1+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
|
||||
checksum = "bbe30f93627849fa362d4a602212d41bb237dc2bd0f8ba0b2ce785012e124220"
|
||||
dependencies = [
|
||||
"indexmap 2.13.0",
|
||||
"serde_core",
|
||||
|
|
@ -4648,18 +4648,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.7.5+spec-1.1.0"
|
||||
version = "1.0.0+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
|
||||
checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_parser"
|
||||
version = "1.0.7+spec-1.1.0"
|
||||
version = "1.0.8+spec-1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "247eaa3197818b831697600aadf81514e577e0cba5eab10f7e064e78ae154df1"
|
||||
checksum = "0742ff5ff03ea7e67c8ae6c93cac239e0d9784833362da3f9a9c1da8dfefcbdc"
|
||||
dependencies = [
|
||||
"winnow",
|
||||
]
|
||||
|
|
@ -4701,7 +4701,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5016,7 +5016,7 @@ dependencies = [
|
|||
"bumpalo",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
|
@ -5246,7 +5246,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5257,7 +5257,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5268,7 +5268,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5279,7 +5279,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -5676,7 +5676,7 @@ name = "yazi-codegen"
|
|||
version = "26.2.2"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -6135,7 +6135,7 @@ checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -6155,14 +6155,14 @@ checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.114",
|
||||
"syn 2.0.115",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7"
|
||||
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
||||
|
||||
[[package]]
|
||||
name = "zune-core"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ ansi-to-tui = "8.0.1"
|
|||
anyhow = "1.0.101"
|
||||
base64 = "0.22.1"
|
||||
bitflags = { version = "2.10.0", features = [ "serde" ] }
|
||||
clap = { version = "4.5.57", features = [ "derive" ] }
|
||||
clap = { version = "4.5.58", features = [ "derive" ] }
|
||||
core-foundation-sys = "0.8.7"
|
||||
crossterm = { version = "0.29.0", features = [ "event-stream" ] }
|
||||
dirs = "6.0.0"
|
||||
|
|
@ -62,7 +62,7 @@ thiserror = "2.0.18"
|
|||
tokio = { version = "1.49.0", features = [ "full" ] }
|
||||
tokio-stream = "0.1.18"
|
||||
tokio-util = "0.7.18"
|
||||
toml = { version = "0.9.12" }
|
||||
toml = { version = "1.0.1" }
|
||||
tracing = { version = "0.1.44", features = [ "max_level_debug", "release_max_level_debug" ] }
|
||||
twox-hash = { version = "2.1.2", default-features = false, features = [ "std", "random", "xxhash3_128" ] }
|
||||
typed-path = "0.12.3"
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Yazi is currently in heavy development, expect breaking changes.
|
|||
| [Black Box](https://gitlab.gnome.org/raggesilver/blackbox) | [Sixel graphics format][sixel] | ✅ Built-in |
|
||||
| [Bobcat](https://github.com/ismail-yilmaz/Bobcat) | [Inline images protocol][iip] | ✅ Built-in |
|
||||
| X11 / Wayland | Window system protocol | ☑️ [Überzug++][ueberzug] required |
|
||||
| Fallback | [ASCII art (Unicode block)][ascii-art] | ☑️ [Chafa][chafa] required |
|
||||
| Fallback | [ASCII art (Unicode block)][ascii-art] | ☑️ [Chafa][chafa] required (>= 1.16.0) |
|
||||
|
||||
See https://yazi-rs.github.io/docs/image-preview for details.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,9 @@ impl Actor for Bootstrap {
|
|||
const NAME: &str = "bootstrap";
|
||||
|
||||
fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> {
|
||||
for (i, file) in BOOT.files.iter().enumerate() {
|
||||
let tabs = &mut cx.core.mgr.tabs;
|
||||
if tabs.len() <= i {
|
||||
tabs.push(Default::default());
|
||||
}
|
||||
cx.mgr.tabs.resize_with(BOOT.files.len(), Default::default);
|
||||
|
||||
for (i, file) in BOOT.files.iter().enumerate().rev() {
|
||||
cx.tab = i;
|
||||
if file.is_empty() {
|
||||
act!(mgr:cd, cx, (BOOT.cwds[i].clone(), CdSource::Tab))?;
|
||||
|
|
@ -28,6 +25,7 @@ impl Actor for Bootstrap {
|
|||
act!(mgr:reveal, cx, (u, CdSource::Tab))?;
|
||||
}
|
||||
}
|
||||
|
||||
succ!();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,6 @@ yazi_macro::mod_flat!(
|
|||
resize
|
||||
resume
|
||||
stop
|
||||
title
|
||||
update_progress
|
||||
);
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ impl Actor for Quit {
|
|||
const NAME: &str = "quit";
|
||||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
cx.core.tasks.shutdown();
|
||||
cx.core.mgr.shutdown();
|
||||
cx.tasks.shutdown();
|
||||
cx.mgr.shutdown();
|
||||
|
||||
futures::executor::block_on(async {
|
||||
_ = futures::join!(
|
||||
|
|
@ -34,7 +34,7 @@ impl Actor for Quit {
|
|||
impl Quit {
|
||||
async fn cwd_to_file(cx: &Ctx<'_>, no: bool) {
|
||||
if let Some(p) = ARGS.cwd_file.as_ref().filter(|_| !no) {
|
||||
let cwd = cx.core.mgr.cwd().to_strand();
|
||||
let cwd = cx.mgr.cwd().to_strand();
|
||||
Local::regular(p).write(cwd.encoded_bytes()).await.ok();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ impl Actor for Resize {
|
|||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
act!(app:reflow, cx, opt)?;
|
||||
|
||||
cx.core.current_mut().arrow(0);
|
||||
cx.core.parent_mut().map(|f| f.arrow(0));
|
||||
cx.core.current_mut().sync_page(true);
|
||||
cx.current_mut().arrow(0);
|
||||
cx.parent_mut().map(|f| f.arrow(0));
|
||||
cx.current_mut().sync_page(true);
|
||||
|
||||
act!(mgr:peek, cx)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ impl Actor for Resume {
|
|||
const NAME: &str = "resume";
|
||||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
cx.core.active_mut().preview.reset();
|
||||
*cx.term = Some(Term::start().unwrap());
|
||||
cx.active_mut().preview.reset();
|
||||
*cx.term = Some(Term::start()?);
|
||||
|
||||
// While the app resumes, it's possible that the terminal size has changed.
|
||||
// We need to trigger a resize, and render the UI based on the resized area.
|
||||
|
|
@ -23,6 +23,7 @@ impl Actor for Resume {
|
|||
|
||||
opt.tx.send((true, opt.token))?;
|
||||
|
||||
act!(app:title, cx).ok();
|
||||
succ!(render!());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ impl Actor for Stop {
|
|||
const NAME: &str = "stop";
|
||||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
cx.core.active_mut().preview.reset_image();
|
||||
cx.active_mut().preview.reset_image();
|
||||
|
||||
// We need to destroy the `term` first before stopping the `signals`
|
||||
// to prevent any signal from triggering the term to render again
|
||||
|
|
|
|||
34
yazi-actor/src/app/title.rs
Normal file
34
yazi-actor/src/app/title.rs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
use anyhow::Result;
|
||||
use crossterm::{execute, terminal::SetTitle};
|
||||
use yazi_actor::Ctx;
|
||||
use yazi_dds::spark::SparkKind;
|
||||
use yazi_macro::succ;
|
||||
use yazi_parser::app::TitleOpt;
|
||||
use yazi_shared::{Source, data::Data};
|
||||
use yazi_term::TermState;
|
||||
use yazi_tty::TTY;
|
||||
|
||||
use crate::Actor;
|
||||
|
||||
pub struct Title;
|
||||
|
||||
impl Actor for Title {
|
||||
type Options = TitleOpt;
|
||||
|
||||
const NAME: &str = "title";
|
||||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
let s = opt.value.unwrap_or_else(|| format!("Yazi: {}", cx.tab().name()).into());
|
||||
execute!(TTY.writer(), SetTitle(&s))?;
|
||||
|
||||
yazi_term::STATE.set(TermState { title: !s.is_empty(), ..yazi_term::STATE.get() });
|
||||
succ!()
|
||||
}
|
||||
|
||||
fn hook(cx: &Ctx, _opt: &Self::Options) -> Option<SparkKind> {
|
||||
match cx.source() {
|
||||
Source::Ind => Some(SparkKind::IndAppTitle),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ impl Actor for UpdateProgress {
|
|||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
// Update the progress of all tasks.
|
||||
let tasks = &mut cx.core.tasks;
|
||||
let tasks = &mut cx.tasks;
|
||||
let progressed = tasks.summary != opt.summary;
|
||||
tasks.summary = opt.summary;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ impl Actor for Close {
|
|||
const NAME: &str = "close";
|
||||
|
||||
fn act(cx: &mut Ctx, opt: Self::Options) -> Result<Data> {
|
||||
let cmp = &mut cx.core.cmp;
|
||||
let cmp = &mut cx.cmp;
|
||||
if let Some(item) = cmp.selected().filter(|_| opt.submit).cloned() {
|
||||
return act!(input:complete, cx, CompleteOpt { name: item.name, is_dir: item.is_dir, ticket: cmp.ticket });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ impl Actor for Cd {
|
|||
act!(mgr:hover, cx)?;
|
||||
act!(mgr:refresh, cx)?;
|
||||
act!(mgr:stash, cx, opt).ok();
|
||||
act!(app:title, cx).ok();
|
||||
succ!(render!());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
use anyhow::Result;
|
||||
use crossterm::{execute, terminal::SetTitle};
|
||||
use yazi_config::YAZI;
|
||||
use yazi_core::tab::Folder;
|
||||
use yazi_fs::{CWD, Files, FilesOp, cha::Cha};
|
||||
use yazi_macro::{act, succ};
|
||||
use yazi_parser::VoidOpt;
|
||||
use yazi_proxy::MgrProxy;
|
||||
use yazi_shared::{data::Data, url::{UrlBuf, UrlLike}};
|
||||
use yazi_tty::TTY;
|
||||
use yazi_vfs::{VfsFiles, VfsFilesOp};
|
||||
|
||||
use crate::{Actor, Ctx};
|
||||
|
|
@ -20,9 +17,7 @@ impl Actor for Refresh {
|
|||
const NAME: &str = "refresh";
|
||||
|
||||
fn act(cx: &mut Ctx, _: Self::Options) -> Result<Data> {
|
||||
if let (_, Some(s)) = (CWD.set(cx.cwd(), Self::cwd_changed), YAZI.mgr.title()) {
|
||||
execute!(TTY.writer(), SetTitle(s)).ok();
|
||||
}
|
||||
CWD.set(cx.cwd(), Self::cwd_changed);
|
||||
|
||||
if let Some(p) = cx.parent() {
|
||||
Self::trigger_dirs(&[cx.current(), p]);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ impl Actor for TabClose {
|
|||
let cx = &mut Ctx::renew(cx);
|
||||
act!(mgr:refresh, cx)?;
|
||||
act!(mgr:peek, cx, true)?;
|
||||
act!(app:title, cx).ok();
|
||||
|
||||
succ!(render!());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ impl Actor for TabCreate {
|
|||
|
||||
act!(mgr:refresh, cx)?;
|
||||
act!(mgr:peek, cx, true)?;
|
||||
act!(app:title, cx).ok();
|
||||
succ!(render!());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
|||
|
||||
use anyhow::Result;
|
||||
use yazi_config::popup::InputCfg;
|
||||
use yazi_macro::{render, succ};
|
||||
use yazi_macro::{act, render, succ};
|
||||
use yazi_parser::mgr::TabRenameOpt;
|
||||
use yazi_proxy::{InputProxy, MgrProxy};
|
||||
use yazi_shared::data::Data;
|
||||
|
|
@ -22,6 +22,7 @@ impl Actor for TabRename {
|
|||
|
||||
if !opt.interactive {
|
||||
pref.name = opt.name.unwrap_or_default().into_owned();
|
||||
act!(app:title, cx).ok();
|
||||
succ!(render!());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ impl Actor for TabSwitch {
|
|||
|
||||
act!(mgr:refresh, cx)?;
|
||||
act!(mgr:peek, cx, true)?;
|
||||
act!(app:title, cx).ok();
|
||||
succ!(render!());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
|||
|
||||
# External dependencies
|
||||
clap = { workspace = true }
|
||||
clap_complete = "4.5.65"
|
||||
clap_complete = "4.5.66"
|
||||
clap_complete_fig = "4.5.2"
|
||||
clap_complete_nushell = "4.5.10"
|
||||
vergen-gitcl = { version = "9.1.0", features = [ "build", "rustc" ] }
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ yazi-shared = { path = "../yazi-shared", version = "26.2.2" }
|
|||
# External build dependencies
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
clap_complete = "4.5.65"
|
||||
clap_complete = "4.5.66"
|
||||
clap_complete_fig = "4.5.2"
|
||||
clap_complete_nushell = "4.5.10"
|
||||
serde = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ proc-macro = true
|
|||
|
||||
[dependencies]
|
||||
# External dependencies
|
||||
syn = { version = "2.0.114", features = [ "full" ] }
|
||||
syn = { version = "2.0.115", features = [ "full" ] }
|
||||
quote = "1.0.44"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ show_hidden = false
|
|||
show_symlink = true
|
||||
scrolloff = 5
|
||||
mouse_events = [ "click", "scroll" ]
|
||||
title_format = "Yazi: {cwd}"
|
||||
|
||||
[preview]
|
||||
wrap = "no"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use anyhow::{Result, bail};
|
||||
use serde::Deserialize;
|
||||
use yazi_codegen::DeserializeOver2;
|
||||
use yazi_fs::{CWD, SortBy};
|
||||
use yazi_shared::{SyncCell, url::UrlLike};
|
||||
use yazi_fs::SortBy;
|
||||
use yazi_shared::SyncCell;
|
||||
|
||||
use super::{MgrRatio, MouseEvents};
|
||||
|
||||
|
|
@ -23,25 +23,9 @@ pub struct Mgr {
|
|||
pub show_symlink: SyncCell<bool>,
|
||||
pub scrolloff: SyncCell<u8>,
|
||||
pub mouse_events: SyncCell<MouseEvents>,
|
||||
pub title_format: String,
|
||||
}
|
||||
|
||||
impl Mgr {
|
||||
pub fn title(&self) -> Option<String> {
|
||||
if self.title_format.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let home = dirs::home_dir().unwrap_or_default();
|
||||
let cwd = if let Ok(p) = CWD.load().try_strip_prefix(home) {
|
||||
format!("~{}{}", std::path::MAIN_SEPARATOR, p.display())
|
||||
} else {
|
||||
format!("{}", CWD.load().display())
|
||||
};
|
||||
|
||||
Some(self.title_format.replace("{cwd}", &cwd))
|
||||
}
|
||||
|
||||
pub(crate) fn reshape(self) -> Result<Self> {
|
||||
if self.linemode.is_empty() || self.linemode.len() > 20 {
|
||||
bail!("[mgr].linemode must be between 1 and 20 characters.");
|
||||
|
|
|
|||
|
|
@ -2,16 +2,21 @@ use std::fmt::Display;
|
|||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum SparkKind {
|
||||
// sort
|
||||
// app:title
|
||||
IndAppTitle,
|
||||
|
||||
// mgr:sort
|
||||
KeySort,
|
||||
IndSort,
|
||||
// stash
|
||||
// mgr:stash
|
||||
IndStash,
|
||||
RelayStash,
|
||||
// quit
|
||||
// mgr:quit
|
||||
KeyQuit,
|
||||
|
||||
// which:activate
|
||||
IndWhichActivate,
|
||||
|
||||
// notify:push
|
||||
RelayNotifyPush,
|
||||
}
|
||||
|
|
@ -19,16 +24,21 @@ pub enum SparkKind {
|
|||
impl AsRef<str> for SparkKind {
|
||||
fn as_ref(&self) -> &str {
|
||||
match self {
|
||||
// sort
|
||||
// app:title
|
||||
Self::IndAppTitle => "ind-app-title",
|
||||
|
||||
// mgr:sort
|
||||
Self::KeySort => "key-sort",
|
||||
Self::IndSort => "ind-sort",
|
||||
// stash
|
||||
// mgr:stash
|
||||
Self::IndStash => "ind-stash",
|
||||
Self::RelayStash => "relay-stash",
|
||||
// quit
|
||||
// mgr:quit
|
||||
Self::KeyQuit => "key-quit",
|
||||
|
||||
// which:activate
|
||||
Self::IndWhichActivate => "ind-which-activate",
|
||||
|
||||
// notify:push
|
||||
Self::RelayNotifyPush => "relay-notify-push",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ pub enum Spark<'a> {
|
|||
AppResize(yazi_parser::app::ReflowOpt),
|
||||
AppResume(yazi_parser::app::ResumeOpt),
|
||||
AppStop(yazi_parser::app::StopOpt),
|
||||
AppTitle(yazi_parser::app::TitleOpt),
|
||||
AppUpdateProgress(yazi_parser::app::UpdateProgressOpt),
|
||||
|
||||
// Mgr
|
||||
|
|
@ -157,16 +158,21 @@ impl<'a> Spark<'a> {
|
|||
use SparkKind::*;
|
||||
|
||||
Ok(match kind {
|
||||
// sort
|
||||
// app:title
|
||||
IndAppTitle => Self::AppTitle(<_>::from_lua(value, lua)?),
|
||||
|
||||
// mgr:sort
|
||||
KeySort => Self::Sort(<_>::from_lua(value, lua)?),
|
||||
IndSort => Self::Sort(<_>::from_lua(value, lua)?),
|
||||
// stash
|
||||
// mgr:stash
|
||||
IndStash => Self::Stash(<_>::from_lua(value, lua)?),
|
||||
RelayStash => Self::Stash(<_>::from_lua(value, lua)?),
|
||||
// quit
|
||||
// mgr:quit
|
||||
KeyQuit => Self::Quit(<_>::from_lua(value, lua)?),
|
||||
|
||||
// which:activate
|
||||
IndWhichActivate => Self::WhichActivate(<_>::from_lua(value, lua)?),
|
||||
|
||||
// notify:push
|
||||
RelayNotifyPush => Self::NotifyPush(<_>::from_lua(value, lua)?),
|
||||
})
|
||||
|
|
@ -192,6 +198,7 @@ impl<'a> IntoLua for Spark<'a> {
|
|||
Self::AppResize(b) => b.into_lua(lua),
|
||||
Self::AppResume(b) => b.into_lua(lua),
|
||||
Self::AppStop(b) => b.into_lua(lua),
|
||||
Self::AppTitle(b) => b.into_lua(lua),
|
||||
Self::AppUpdateProgress(b) => b.into_lua(lua),
|
||||
|
||||
// Mgr
|
||||
|
|
@ -358,6 +365,7 @@ try_from_spark!(yazi_parser::app::QuitOpt, app:quit, mgr:quit);
|
|||
try_from_spark!(yazi_parser::app::ReflowOpt, app:reflow, app:resize);
|
||||
try_from_spark!(yazi_parser::app::ResumeOpt, app:resume);
|
||||
try_from_spark!(yazi_parser::app::StopOpt, app:stop);
|
||||
try_from_spark!(yazi_parser::app::TitleOpt, app:title);
|
||||
try_from_spark!(yazi_parser::app::UpdateProgressOpt, app:update_progress);
|
||||
try_from_spark!(yazi_parser::cmp::CloseOpt, cmp:close);
|
||||
try_from_spark!(yazi_parser::cmp::ShowOpt, cmp:show);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
yazi_macro::mod_flat!(deprecate mouse plugin quit reflow resume stop update_progress);
|
||||
yazi_macro::mod_flat!(deprecate mouse plugin quit reflow resume stop title update_progress);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use yazi_binding::SER_OPT;
|
||||
use yazi_shared::{event::CmdCow, strand::StrandBuf};
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
|
|
@ -31,5 +32,5 @@ impl FromLua for QuitOpt {
|
|||
}
|
||||
|
||||
impl IntoLua for QuitOpt {
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value(&self) }
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value_with(&self, SER_OPT) }
|
||||
}
|
||||
|
|
|
|||
17
yazi-parser/src/app/title.rs
Normal file
17
yazi-parser/src/app/title.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use yazi_binding::SER_OPT;
|
||||
use yazi_shared::SStr;
|
||||
|
||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
||||
pub struct TitleOpt {
|
||||
pub value: Option<SStr>,
|
||||
}
|
||||
|
||||
impl FromLua for TitleOpt {
|
||||
fn from_lua(value: Value, lua: &Lua) -> mlua::Result<Self> { lua.from_value(value) }
|
||||
}
|
||||
|
||||
impl IntoLua for TitleOpt {
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value_with(&self, SER_OPT) }
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use yazi_binding::SER_OPT;
|
||||
use yazi_fs::SortBy;
|
||||
use yazi_shared::event::CmdCow;
|
||||
|
||||
|
|
@ -31,5 +32,5 @@ impl FromLua for SortOpt {
|
|||
}
|
||||
|
||||
impl IntoLua for SortOpt {
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value(&self) }
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value_with(&self, SER_OPT) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use anyhow::bail;
|
||||
use mlua::{ExternalError, FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use yazi_binding::Url;
|
||||
use yazi_binding::{SER_OPT, Url};
|
||||
use yazi_shared::{event::CmdCow, url::UrlBuf};
|
||||
|
||||
use crate::mgr::{CdOpt, CdSource};
|
||||
|
|
@ -37,7 +37,7 @@ impl IntoLua for StashOpt {
|
|||
lua
|
||||
.create_table_from([
|
||||
("target", Url::new(self.target).into_lua(lua)?),
|
||||
("source", lua.to_value(&self.source)?),
|
||||
("source", lua.to_value_with(&self.source, SER_OPT)?),
|
||||
])?
|
||||
.into_lua(lua)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ use anyhow::anyhow;
|
|||
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::{DurationSecondsWithFrac, serde_as};
|
||||
use yazi_binding::SER_OPT;
|
||||
use yazi_config::{Style, THEME};
|
||||
use yazi_shared::event::CmdCow;
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ impl FromLua for PushOpt {
|
|||
}
|
||||
|
||||
impl IntoLua for PushOpt {
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value(&self) }
|
||||
fn into_lua(self, lua: &Lua) -> mlua::Result<Value> { lua.to_value_with(&self, SER_OPT) }
|
||||
}
|
||||
|
||||
// --- Level
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ fn mgr() -> Composer<ComposerGet, ComposerSet> {
|
|||
b"show_symlink" => m.show_symlink.get().into_lua(lua)?,
|
||||
b"scrolloff" => m.scrolloff.get().into_lua(lua)?,
|
||||
b"mouse_events" => lua.to_value_with(&m.mouse_events, SER_OPT)?,
|
||||
b"title_format" => lua.create_string(&m.title_format)?.into_lua(lua)?,
|
||||
_ => return Ok(Value::Nil),
|
||||
}
|
||||
.into_lua(lua)
|
||||
|
|
|
|||
|
|
@ -3,15 +3,10 @@ use yazi_config::{THEME, YAZI};
|
|||
pub(super) struct TermOption {
|
||||
pub bg: String,
|
||||
pub mouse: bool,
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for TermOption {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
bg: THEME.app.bg_color(),
|
||||
mouse: !YAZI.mgr.mouse_events.get().is_empty(),
|
||||
title: YAZI.mgr.title(),
|
||||
}
|
||||
Self { bg: THEME.app.bg_color(), mouse: !YAZI.mgr.mouse_events.get().is_empty() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
use crate::TermOption;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub(super) struct TermState {
|
||||
pub(super) bg: bool,
|
||||
pub(super) csi_u: bool,
|
||||
pub(super) mouse: bool,
|
||||
pub(super) title: bool,
|
||||
pub(super) cursor_shape: u8,
|
||||
pub(super) cursor_blink: bool,
|
||||
pub struct TermState {
|
||||
pub bg: bool,
|
||||
pub csi_u: bool,
|
||||
pub mouse: bool,
|
||||
pub title: bool,
|
||||
pub cursor_shape: u8,
|
||||
pub cursor_blink: bool,
|
||||
}
|
||||
|
||||
impl TermState {
|
||||
|
|
@ -37,7 +37,7 @@ impl TermState {
|
|||
bg: !opt.bg.is_empty(),
|
||||
csi_u,
|
||||
mouse: opt.mouse,
|
||||
title: opt.title.is_some(),
|
||||
title: false,
|
||||
cursor_shape,
|
||||
cursor_blink,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use yazi_tty::{TTY, TtyWriter};
|
|||
|
||||
use crate::{TermOption, TermState};
|
||||
|
||||
static STATE: SyncCell<TermState> = SyncCell::new(TermState::default());
|
||||
pub static STATE: SyncCell<TermState> = SyncCell::new(TermState::default());
|
||||
|
||||
pub struct Term {
|
||||
inner: Terminal<CrosstermBackend<TtyWriter<'static>>>,
|
||||
|
|
@ -61,10 +61,6 @@ impl Term {
|
|||
);
|
||||
}
|
||||
|
||||
if let Some(s) = opt.title {
|
||||
queue!(TTY.writer(), SetTitle(s)).ok();
|
||||
}
|
||||
|
||||
term.inner.hide_cursor()?;
|
||||
term.inner.clear()?;
|
||||
term.inner.flush()?;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue