mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Merge branch 'main' into pr-a8721e1e
This commit is contained in:
commit
3f6498bc17
41 changed files with 331 additions and 261 deletions
130
Cargo.lock
generated
130
Cargo.lock
generated
|
|
@ -376,7 +376,7 @@ dependencies = [
|
|||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
"num-traits",
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1728,7 +1728,7 @@ dependencies = [
|
|||
"libc",
|
||||
"redox_syscall 0.5.2",
|
||||
"smallvec",
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2551,9 +2551,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.8.16"
|
||||
version = "0.8.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c"
|
||||
checksum = "7a44eede9b727419af8095cb2d72fab15487a541f54647ad4414b34096ee4631"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
|
|
@ -2564,18 +2564,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.7"
|
||||
version = "0.6.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db"
|
||||
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.22.17"
|
||||
version = "0.22.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16"
|
||||
checksum = "1490595c74d930da779e944f5ba2ecdf538af67df1a9848cbd156af43c1b7cf0"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
|
|
@ -2983,7 +2983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132"
|
||||
dependencies = [
|
||||
"windows-core 0.56.0",
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2992,7 +2992,7 @@ version = "0.52.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3004,7 +3004,7 @@ dependencies = [
|
|||
"windows-implement",
|
||||
"windows-interface",
|
||||
"windows-result",
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3035,7 +3035,7 @@ version = "0.1.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3053,7 +3053,16 @@ version = "0.52.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3073,18 +3082,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.5",
|
||||
"windows_aarch64_msvc 0.52.5",
|
||||
"windows_i686_gnu 0.52.5",
|
||||
"windows_aarch64_gnullvm 0.52.6",
|
||||
"windows_aarch64_msvc 0.52.6",
|
||||
"windows_i686_gnu 0.52.6",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc 0.52.5",
|
||||
"windows_x86_64_gnu 0.52.5",
|
||||
"windows_x86_64_gnullvm 0.52.5",
|
||||
"windows_x86_64_msvc 0.52.5",
|
||||
"windows_i686_msvc 0.52.6",
|
||||
"windows_x86_64_gnu 0.52.6",
|
||||
"windows_x86_64_gnullvm 0.52.6",
|
||||
"windows_x86_64_msvc 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -3095,9 +3104,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
|||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
|
|
@ -3107,9 +3116,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
|||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
|
|
@ -3119,15 +3128,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
|||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
|
|
@ -3137,9 +3146,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
|||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
|
|
@ -3149,9 +3158,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
|||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
|
|
@ -3161,9 +3170,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
|||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
|
|
@ -3173,15 +3182,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
|||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.5"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.6.13"
|
||||
version = "0.6.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
|
||||
checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
|
@ -3194,7 +3203,7 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"
|
|||
|
||||
[[package]]
|
||||
name = "yazi-adapter"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
|
|
@ -3216,7 +3225,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-boot"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"clap_complete",
|
||||
|
|
@ -3232,7 +3241,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-cli"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
|
@ -3253,7 +3262,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-config"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
|
@ -3271,7 +3280,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-core"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.6.0",
|
||||
|
|
@ -3282,7 +3291,6 @@ dependencies = [
|
|||
"notify",
|
||||
"parking_lot",
|
||||
"ratatui",
|
||||
"regex",
|
||||
"scopeguard",
|
||||
"serde",
|
||||
"shell-words",
|
||||
|
|
@ -3295,6 +3303,7 @@ dependencies = [
|
|||
"yazi-boot",
|
||||
"yazi-config",
|
||||
"yazi-dds",
|
||||
"yazi-fs",
|
||||
"yazi-plugin",
|
||||
"yazi-proxy",
|
||||
"yazi-scheduler",
|
||||
|
|
@ -3303,7 +3312,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-dds"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"mlua",
|
||||
|
|
@ -3322,7 +3331,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-fm"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"better-panic",
|
||||
|
|
@ -3346,14 +3355,29 @@ dependencies = [
|
|||
"yazi-config",
|
||||
"yazi-core",
|
||||
"yazi-dds",
|
||||
"yazi-fs",
|
||||
"yazi-plugin",
|
||||
"yazi-proxy",
|
||||
"yazi-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yazi-fs"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures",
|
||||
"ratatui",
|
||||
"regex",
|
||||
"tokio",
|
||||
"yazi-config",
|
||||
"yazi-proxy",
|
||||
"yazi-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yazi-plugin"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
|
|
@ -3391,7 +3415,7 @@ checksum = "f4b6c8e12e39ac0f79fa96f36e5b88e0da8d230691abd729eec709b43c74f632"
|
|||
|
||||
[[package]]
|
||||
name = "yazi-proxy"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"mlua",
|
||||
|
|
@ -3402,7 +3426,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-scheduler"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-priority-channel",
|
||||
|
|
@ -3422,7 +3446,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "yazi-shared"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.6.0",
|
||||
|
|
@ -3437,7 +3461,7 @@ dependencies = [
|
|||
"serde",
|
||||
"shell-words",
|
||||
"tokio",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
63
flake.nix
63
flake.nix
|
|
@ -11,50 +11,51 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }@inputs:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
rust-overlay,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
# Nixpkgs overlays
|
||||
overlays = [
|
||||
rust-overlay.overlays.default
|
||||
(final: prev: {
|
||||
rustToolchain = final.rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" ];
|
||||
};
|
||||
(final: _: {
|
||||
rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; };
|
||||
})
|
||||
];
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
versionSuffix = "pre${
|
||||
builtins.substring 0 8
|
||||
(self.lastModifiedDate or self.lastModified or "19700101")
|
||||
}_${self.shortRev or "dirty"}";
|
||||
version = (builtins.fromTOML
|
||||
(builtins.readFile ./yazi-fm/Cargo.toml)).package.version
|
||||
+ versionSuffix;
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
rev = self.shortRev or "dirty";
|
||||
date = self.lastModifiedDate or self.lastModified or "19700101";
|
||||
version =
|
||||
(builtins.fromTOML (builtins.readFile ./yazi-fm/Cargo.toml)).package.version
|
||||
+ "pre${builtins.substring 0 8 date}_${rev}";
|
||||
|
||||
yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { inherit version; };
|
||||
yazi = pkgs.callPackage ./nix/yazi.nix { inherit yazi-unwrapped; };
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
inherit yazi-unwrapped yazi;
|
||||
default = yazi;
|
||||
};
|
||||
yazi-unwrapped = pkgs.callPackage ./nix/yazi-unwrapped.nix { inherit version rev date; };
|
||||
yazi = pkgs.callPackage ./nix/yazi.nix { inherit yazi-unwrapped; };
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
inherit yazi-unwrapped yazi;
|
||||
default = yazi;
|
||||
};
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
|
||||
devShells.default = import ./nix/shell.nix { inherit pkgs inputs; };
|
||||
})
|
||||
devShells.default = import ./nix/shell.nix { inherit pkgs inputs; };
|
||||
}
|
||||
)
|
||||
// {
|
||||
overlays = rec {
|
||||
default = yazi;
|
||||
yazi = final: prev: {
|
||||
yazi-unwrapped = self.packages."${final.system}".yazi-unwrapped;
|
||||
yazi = self.packages."${final.system}".yazi;
|
||||
};
|
||||
yazi = final: _: { inherit (self.packages."${final.system}") yazi yazi-unwrapped; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,9 +18,11 @@ pkgs.mkShell {
|
|||
zoxide
|
||||
];
|
||||
|
||||
buildInputs = with pkgs;
|
||||
lib.optionals stdenv.isDarwin
|
||||
(with darwin.apple_sdk.frameworks; [ Foundation ]);
|
||||
buildInputs =
|
||||
with pkgs;
|
||||
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Foundation ]);
|
||||
|
||||
env = { RUST_BACKTRACE = "1"; };
|
||||
env = {
|
||||
RUST_BACKTRACE = "1";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,50 +1,67 @@
|
|||
{ makeRustPlatform
|
||||
, rustToolchain
|
||||
, version ? "git"
|
||||
, lib
|
||||
{
|
||||
makeRustPlatform,
|
||||
rustToolchain,
|
||||
version ? "git",
|
||||
rev,
|
||||
date,
|
||||
lib,
|
||||
|
||||
, installShellFiles
|
||||
, stdenv
|
||||
, darwin
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
darwin,
|
||||
|
||||
, imagemagick
|
||||
imagemagick,
|
||||
}:
|
||||
|
||||
(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage rec {
|
||||
pname = "yazi";
|
||||
inherit version;
|
||||
(makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
}).buildRustPackage
|
||||
{
|
||||
pname = "yazi";
|
||||
inherit version;
|
||||
|
||||
src = ../.;
|
||||
src = ../.;
|
||||
|
||||
cargoLock.lockFile = ../Cargo.lock;
|
||||
cargoLock = {
|
||||
lockFile = ../Cargo.lock;
|
||||
outputHashes = {
|
||||
"notify-6.1.1" = "sha256-5Ft2yvRPi2EaErcGBkF/3Xv6K7ijFGbdjmSqI4go/h4=";
|
||||
};
|
||||
};
|
||||
|
||||
env.YAZI_GEN_COMPLETIONS = true;
|
||||
env = {
|
||||
YAZI_GEN_COMPLETIONS = true;
|
||||
VERGEN_GIT_SHA = rev;
|
||||
VERGEN_BUILD_DATE = builtins.concatStringsSep "-" (builtins.match "(.{4})(.{2})(.{2}).*" date);
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles imagemagick ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (
|
||||
with darwin.apple_sdk.frameworks; [ Foundation ]
|
||||
);
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
imagemagick
|
||||
];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Foundation ]);
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd yazi \
|
||||
--bash ./yazi-boot/completions/yazi.bash \
|
||||
--fish ./yazi-boot/completions/yazi.fish \
|
||||
--zsh ./yazi-boot/completions/_yazi
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd yazi \
|
||||
--bash ./yazi-boot/completions/yazi.bash \
|
||||
--fish ./yazi-boot/completions/yazi.fish \
|
||||
--zsh ./yazi-boot/completions/_yazi
|
||||
|
||||
# Resize logo
|
||||
for RES in 16 24 32 48 64 128 256; do
|
||||
mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
|
||||
magick assets/logo.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/yazi.png
|
||||
done
|
||||
# Resize logo
|
||||
for RES in 16 24 32 48 64 128 256; do
|
||||
mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
|
||||
magick assets/logo.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/yazi.png
|
||||
done
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
install -m644 assets/yazi.desktop $out/share/applications/
|
||||
'';
|
||||
mkdir -p $out/share/applications
|
||||
install -m644 assets/yazi.desktop $out/share/applications/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
||||
homepage = "https://github.com/sxyazi/yazi";
|
||||
license = licenses.mit;
|
||||
mainProgram = "yazi";
|
||||
};
|
||||
}
|
||||
meta = {
|
||||
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
||||
homepage = "https://github.com/sxyazi/yazi";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "yazi";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
71
nix/yazi.nix
71
nix/yazi.nix
|
|
@ -1,31 +1,33 @@
|
|||
{ lib
|
||||
, runCommand
|
||||
, makeWrapper
|
||||
, yazi-unwrapped
|
||||
{
|
||||
lib,
|
||||
runCommand,
|
||||
makeWrapper,
|
||||
yazi-unwrapped,
|
||||
|
||||
, withFile ? true
|
||||
, file
|
||||
, withJq ? true
|
||||
, jq
|
||||
, withPoppler ? true
|
||||
, poppler_utils
|
||||
, withUnar ? true
|
||||
, unar
|
||||
, withFfmpegthumbnailer ? true
|
||||
, ffmpegthumbnailer
|
||||
, withFd ? true
|
||||
, fd
|
||||
, withRipgrep ? true
|
||||
, ripgrep
|
||||
, withFzf ? true
|
||||
, fzf
|
||||
, withZoxide ? true
|
||||
, zoxide
|
||||
withFile ? true,
|
||||
file,
|
||||
withJq ? true,
|
||||
jq,
|
||||
withPoppler ? true,
|
||||
poppler_utils,
|
||||
withUnar ? true,
|
||||
unar,
|
||||
withFfmpegthumbnailer ? true,
|
||||
ffmpegthumbnailer,
|
||||
withFd ? true,
|
||||
fd,
|
||||
withRipgrep ? true,
|
||||
ripgrep,
|
||||
withFzf ? true,
|
||||
fzf,
|
||||
withZoxide ? true,
|
||||
zoxide,
|
||||
}:
|
||||
|
||||
let
|
||||
runtimePaths = with lib; [ ]
|
||||
++ optional withFile file
|
||||
inherit (lib) optional makeBinPath;
|
||||
runtimePaths =
|
||||
optional withFile file
|
||||
++ optional withJq jq
|
||||
++ optional withPoppler poppler_utils
|
||||
++ optional withUnar unar
|
||||
|
|
@ -36,14 +38,15 @@ let
|
|||
++ optional withZoxide zoxide;
|
||||
in
|
||||
runCommand yazi-unwrapped.name
|
||||
{
|
||||
inherit (yazi-unwrapped) pname version meta;
|
||||
{
|
||||
inherit (yazi-unwrapped) pname version meta;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${yazi-unwrapped}/share $out/share
|
||||
ln -s ${yazi-unwrapped}/bin/ya $out/bin/ya
|
||||
makeWrapper ${yazi-unwrapped}/bin/yazi $out/bin/yazi \
|
||||
--prefix PATH : "${lib.makeBinPath runtimePaths}"
|
||||
''
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
ln -s ${yazi-unwrapped}/share $out/share
|
||||
ln -s ${yazi-unwrapped}/bin/ya $out/bin/ya
|
||||
makeWrapper ${yazi-unwrapped}/bin/yazi $out/bin/yazi \
|
||||
--prefix PATH : "${makeBinPath runtimePaths}"
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-adapter"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,8 +9,8 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
ansi-to-tui = "=3.1.0"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-boot"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -10,9 +10,9 @@ repository = "https://github.com/sxyazi/yazi"
|
|||
|
||||
[dependencies]
|
||||
regex = "1.10.5"
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
clap = { version = "4.5.11", features = [ "derive" ] }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-cli"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,9 +9,9 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
@ -20,11 +20,11 @@ crossterm = "0.27.0"
|
|||
md-5 = "0.10.6"
|
||||
serde_json = "1.0.121"
|
||||
tokio = { version = "1.39.2", features = [ "full" ] }
|
||||
toml_edit = "0.22.17"
|
||||
toml_edit = "0.22.18"
|
||||
url = "2.5.2"
|
||||
|
||||
[build-dependencies]
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External build dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-config"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,7 +9,7 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
@ -21,7 +21,7 @@ indexmap = "2.2.6"
|
|||
ratatui = "0.27.0"
|
||||
regex = "1.10.5"
|
||||
serde = { version = "1.0.204", features = [ "derive" ] }
|
||||
toml = { version = "0.8.16", features = [ "preserve_order" ] }
|
||||
toml = { version = "0.8.17", features = [ "preserve_order" ] }
|
||||
validator = { version = "0.18.1", features = [ "derive" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-core"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,14 +9,15 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.2.5" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
|
||||
yazi-fs = { path = "../yazi-fs", version = "0.3.0" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.3.0" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
|
||||
yazi-scheduler = { path = "../yazi-scheduler", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
@ -27,7 +28,6 @@ futures = "0.3.30"
|
|||
notify = { git = "https://github.com/notify-rs/notify.git", rev = "96dec74316a93bed6eec9db177b233e6e017275e", default-features = false, features = [ "macos_fsevent" ] }
|
||||
parking_lot = "0.12.3"
|
||||
ratatui = "0.27.0"
|
||||
regex = "1.10.5"
|
||||
scopeguard = "1.2.0"
|
||||
serde = "1.0.204"
|
||||
shell-words = "1.1.0"
|
||||
|
|
|
|||
|
|
@ -7,19 +7,15 @@
|
|||
)]
|
||||
|
||||
pub mod completion;
|
||||
pub mod folder;
|
||||
pub mod help;
|
||||
pub mod input;
|
||||
pub mod manager;
|
||||
pub mod notify;
|
||||
pub mod select;
|
||||
mod step;
|
||||
pub mod tab;
|
||||
pub mod tasks;
|
||||
pub mod which;
|
||||
|
||||
pub use step::*;
|
||||
|
||||
pub fn init() {
|
||||
manager::WATCHED.with(<_>::default);
|
||||
manager::LINKED.with(<_>::default);
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ use std::{borrow::Cow, ffi::OsString};
|
|||
use tracing::error;
|
||||
use yazi_boot::ARGS;
|
||||
use yazi_config::{popup::SelectCfg, OPEN};
|
||||
use yazi_fs::Folder;
|
||||
use yazi_plugin::isolate;
|
||||
use yazi_proxy::{options::OpenDoOpt, ManagerProxy, TasksProxy};
|
||||
use yazi_shared::{emit, event::{Cmd, EventQuit}, fs::{File, Url}, MIME_DIR};
|
||||
|
||||
use crate::{folder::Folder, manager::Manager, tasks::Tasks};
|
||||
use crate::{manager::Manager, tasks::Tasks};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Opt {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use yazi_fs::Folder;
|
||||
use yazi_proxy::ManagerProxy;
|
||||
use yazi_shared::{event::Cmd, fs::FilesOp, render};
|
||||
|
||||
use crate::{folder::Folder, manager::{Manager, LINKED}, tab::Tab, tasks::Tasks};
|
||||
use crate::{manager::{Manager, LINKED}, tab::Tab, tasks::Tasks};
|
||||
|
||||
pub struct Opt {
|
||||
op: FilesOp,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use yazi_fs::Folder;
|
||||
use yazi_shared::fs::{File, Url};
|
||||
|
||||
use super::{Tabs, Watcher, Yanked};
|
||||
use crate::{folder::Folder, tab::Tab};
|
||||
use crate::tab::Tab;
|
||||
|
||||
pub struct Manager {
|
||||
pub tabs: Tabs,
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use parking_lot::RwLock;
|
|||
use tokio::{fs, pin, sync::{mpsc::{self, UnboundedReceiver}, watch}};
|
||||
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
|
||||
use tracing::error;
|
||||
use yazi_fs::{Files, Folder};
|
||||
use yazi_plugin::isolate;
|
||||
use yazi_proxy::WATCHER;
|
||||
use yazi_shared::{fs::{symlink_realname, File, FilesOp, Url}, RoCell};
|
||||
|
||||
use super::Linked;
|
||||
use crate::folder::{Files, Folder};
|
||||
|
||||
pub(crate) static WATCHED: RoCell<RwLock<HashSet<Url>>> = RoCell::new();
|
||||
pub static LINKED: RoCell<RwLock<Linked>> = RoCell::new();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use yazi_fs::Step;
|
||||
use yazi_proxy::ManagerProxy;
|
||||
use yazi_shared::{event::{Cmd, Data}, render};
|
||||
|
||||
use crate::{tab::Tab, Step};
|
||||
use crate::tab::Tab;
|
||||
|
||||
pub struct Opt {
|
||||
step: Step,
|
||||
|
|
@ -19,11 +20,8 @@ impl From<Cmd> for Opt {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> From<T> for Opt
|
||||
where
|
||||
T: Into<Step>,
|
||||
{
|
||||
fn from(t: T) -> Self { Self { step: t.into() } }
|
||||
impl From<isize> for Opt {
|
||||
fn from(n: isize) -> Self { Self { step: n.into() } }
|
||||
}
|
||||
|
||||
impl Tab {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ use std::time::Duration;
|
|||
use tokio::pin;
|
||||
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
|
||||
use yazi_config::popup::InputCfg;
|
||||
use yazi_fs::{Filter, FilterCase};
|
||||
use yazi_proxy::{InputProxy, ManagerProxy};
|
||||
use yazi_shared::{emit, event::Cmd, render, Debounce, InputError, Layer};
|
||||
|
||||
use crate::{folder::{Filter, FilterCase}, tab::Tab};
|
||||
use crate::tab::Tab;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Opt {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ use std::time::Duration;
|
|||
use tokio::pin;
|
||||
use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
|
||||
use yazi_config::popup::InputCfg;
|
||||
use yazi_fs::FilterCase;
|
||||
use yazi_proxy::InputProxy;
|
||||
use yazi_shared::{emit, event::Cmd, render, Debounce, InputError, Layer};
|
||||
|
||||
use crate::{folder::FilterCase, tab::{Finder, Tab}};
|
||||
use crate::tab::{Finder, Tab};
|
||||
|
||||
pub struct Opt {
|
||||
query: Option<String>,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use yazi_config::{manager::SortBy, MANAGER};
|
||||
|
||||
use crate::folder::FilesSorter;
|
||||
use yazi_fs::FilesSorter;
|
||||
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct Config {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use anyhow::Result;
|
||||
use yazi_fs::{Files, Filter, FilterCase};
|
||||
use yazi_shared::fs::Url;
|
||||
|
||||
use crate::folder::{Files, Filter, FilterCase};
|
||||
|
||||
pub struct Finder {
|
||||
pub filter: Filter,
|
||||
matched: HashMap<Url, u8>,
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@ use tokio_stream::{wrappers::UnboundedReceiverStream, StreamExt};
|
|||
use tokio_util::sync::CancellationToken;
|
||||
use yazi_adapter::ADAPTOR;
|
||||
use yazi_config::PLUGIN;
|
||||
use yazi_fs::Files;
|
||||
use yazi_plugin::{external::Highlighter, isolate, utils::PreviewLock};
|
||||
use yazi_shared::{fs::{Cha, File, FilesOp, Url}, MIME_DIR};
|
||||
|
||||
use crate::folder::Files;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Preview {
|
||||
pub lock: Option<PreviewLock>,
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ use std::{collections::HashMap, iter};
|
|||
|
||||
use anyhow::Result;
|
||||
use tokio::task::JoinHandle;
|
||||
use yazi_fs::{Folder, FolderStage};
|
||||
use yazi_shared::{fs::Url, render};
|
||||
|
||||
use super::{Backstack, Config, Finder, Mode, Preview};
|
||||
use crate::{folder::{Folder, FolderStage}, tab::Selected};
|
||||
use crate::tab::Selected;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Tab {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use yazi_config::{manager::SortBy, plugin::MAX_PREWORKERS, PLUGIN};
|
||||
use yazi_fs::Files;
|
||||
use yazi_shared::{fs::{File, Url}, MIME_DIR};
|
||||
|
||||
use super::Tasks;
|
||||
use crate::folder::Files;
|
||||
|
||||
impl Tasks {
|
||||
pub fn fetch_paged(&self, paged: &[File], mimetype: &HashMap<Url, String>) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-dds"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -13,8 +13,8 @@ default = [ "vendored-lua" ]
|
|||
vendored-lua = [ "mlua/vendored" ]
|
||||
|
||||
[dependencies]
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-fm"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -13,14 +13,15 @@ default = [ "vendored-lua" ]
|
|||
vendored-lua = [ "mlua/vendored" ]
|
||||
|
||||
[dependencies]
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.2.5" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-core = { path = "../yazi-core", version = "0.2.5" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-core = { path = "../yazi-core", version = "0.3.0" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
|
||||
yazi-fs = { path = "../yazi-fs", version = "0.3.0" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.3.0" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use super::{CtxRef, SCOPE};
|
|||
|
||||
pub(super) struct File {
|
||||
idx: usize,
|
||||
folder: *const yazi_core::folder::Folder,
|
||||
folder: *const yazi_fs::Folder,
|
||||
tab: *const yazi_core::tab::Tab,
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ impl File {
|
|||
#[inline]
|
||||
pub(super) fn make(
|
||||
idx: usize,
|
||||
folder: &yazi_core::folder::Folder,
|
||||
folder: &yazi_fs::Folder,
|
||||
tab: &yazi_core::tab::Tab,
|
||||
) -> mlua::Result<AnyUserData<'static>> {
|
||||
SCOPE.create_any_userdata(Self { idx, folder, tab })
|
||||
|
|
@ -125,7 +125,7 @@ impl File {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn folder(&self) -> &yazi_core::folder::Folder { unsafe { &*self.folder } }
|
||||
fn folder(&self) -> &yazi_fs::Folder { unsafe { &*self.folder } }
|
||||
|
||||
#[inline]
|
||||
fn tab(&self) -> &yazi_core::tab::Tab { unsafe { &*self.tab } }
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use super::{File, Filter, SCOPE};
|
|||
|
||||
pub(super) struct Files {
|
||||
window: Range<usize>,
|
||||
folder: *const yazi_core::folder::Folder,
|
||||
folder: *const yazi_fs::Folder,
|
||||
tab: *const yazi_core::tab::Tab,
|
||||
}
|
||||
|
||||
impl Deref for Files {
|
||||
type Target = yazi_core::folder::Files;
|
||||
type Target = yazi_fs::Files;
|
||||
|
||||
fn deref(&self) -> &Self::Target { &self.folder().files }
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ impl Files {
|
|||
#[inline]
|
||||
pub(super) fn make(
|
||||
window: Range<usize>,
|
||||
folder: &yazi_core::folder::Folder,
|
||||
folder: &yazi_fs::Folder,
|
||||
tab: &yazi_core::tab::Tab,
|
||||
) -> mlua::Result<AnyUserData<'static>> {
|
||||
SCOPE.create_any_userdata(Self { window, folder, tab })
|
||||
|
|
@ -46,7 +46,7 @@ impl Files {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn folder(&self) -> &yazi_core::folder::Folder { unsafe { &*self.folder } }
|
||||
fn folder(&self) -> &yazi_fs::Folder { unsafe { &*self.folder } }
|
||||
|
||||
#[inline]
|
||||
fn tab(&self) -> &yazi_core::tab::Tab { unsafe { &*self.tab } }
|
||||
|
|
|
|||
|
|
@ -5,18 +5,18 @@ use mlua::{AnyUserData, Lua, MetaMethod, UserDataMethods};
|
|||
use super::SCOPE;
|
||||
|
||||
pub(super) struct Filter {
|
||||
inner: *const yazi_core::folder::Filter,
|
||||
inner: *const yazi_fs::Filter,
|
||||
}
|
||||
|
||||
impl Deref for Filter {
|
||||
type Target = yazi_core::folder::Filter;
|
||||
type Target = yazi_fs::Filter;
|
||||
|
||||
fn deref(&self) -> &Self::Target { unsafe { &*self.inner } }
|
||||
}
|
||||
|
||||
impl Filter {
|
||||
#[inline]
|
||||
pub(super) fn make(inner: &yazi_core::folder::Filter) -> mlua::Result<AnyUserData<'static>> {
|
||||
pub(super) fn make(inner: &yazi_fs::Filter) -> mlua::Result<AnyUserData<'static>> {
|
||||
SCOPE.create_any_userdata(Self { inner })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ use super::{File, Files, SCOPE};
|
|||
|
||||
pub(super) struct Folder {
|
||||
window: Range<usize>,
|
||||
inner: *const yazi_core::folder::Folder,
|
||||
inner: *const yazi_fs::Folder,
|
||||
tab: *const yazi_core::tab::Tab,
|
||||
}
|
||||
|
||||
impl Deref for Folder {
|
||||
type Target = yazi_core::folder::Folder;
|
||||
type Target = yazi_fs::Folder;
|
||||
|
||||
fn deref(&self) -> &Self::Target { unsafe { &*self.inner } }
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ impl Folder {
|
|||
#[inline]
|
||||
pub(super) fn make(
|
||||
window: Option<Range<usize>>,
|
||||
inner: &yazi_core::folder::Folder,
|
||||
inner: &yazi_fs::Folder,
|
||||
tab: &yazi_core::tab::Tab,
|
||||
) -> mlua::Result<AnyUserData<'static>> {
|
||||
let window = match window {
|
||||
|
|
@ -50,9 +50,9 @@ impl Folder {
|
|||
});
|
||||
})?;
|
||||
|
||||
lua.register_userdata_type::<yazi_core::folder::FolderStage>(|reg| {
|
||||
lua.register_userdata_type::<yazi_fs::FolderStage>(|reg| {
|
||||
reg.add_meta_method(MetaMethod::ToString, |lua, me, ()| {
|
||||
use yazi_core::folder::FolderStage::{Failed, Loaded, Loading};
|
||||
use yazi_fs::FolderStage::{Failed, Loaded, Loading};
|
||||
lua.create_string(match me {
|
||||
Loading => "loading",
|
||||
Loaded => "loaded",
|
||||
|
|
|
|||
21
yazi-fs/Cargo.toml
Normal file
21
yazi-fs/Cargo.toml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[package]
|
||||
name = "yazi-fs"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
description = "Yazi File System"
|
||||
homepage = "https://yazi-rs.github.io"
|
||||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
futures = "0.3.30"
|
||||
ratatui = "0.27.0"
|
||||
regex = "1.10.5"
|
||||
tokio = { version = "1.39.2", features = [ "full" ] }
|
||||
|
|
@ -7,11 +7,11 @@ use yazi_shared::fs::{maybe_exists, File, FilesOp, Url, FILES_TICKET};
|
|||
use super::{FilesSorter, Filter};
|
||||
|
||||
pub struct Files {
|
||||
hidden: Vec<File>,
|
||||
items: Vec<File>,
|
||||
ticket: u64,
|
||||
version: u64,
|
||||
pub(crate) revision: u64,
|
||||
hidden: Vec<File>,
|
||||
items: Vec<File>,
|
||||
ticket: u64,
|
||||
version: u64,
|
||||
pub revision: u64,
|
||||
|
||||
pub sizes: HashMap<Url, u64>,
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ use yazi_proxy::ManagerProxy;
|
|||
use yazi_shared::fs::{File, FilesOp, Url};
|
||||
|
||||
use super::FolderStage;
|
||||
use crate::{folder::Files, Step};
|
||||
use crate::{Files, Step};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Folder {
|
||||
|
|
@ -1,11 +1,15 @@
|
|||
#![allow(clippy::if_same_then_else)]
|
||||
|
||||
mod files;
|
||||
mod filter;
|
||||
mod folder;
|
||||
mod sorter;
|
||||
mod stage;
|
||||
mod step;
|
||||
|
||||
pub use files::*;
|
||||
pub use filter::*;
|
||||
pub use folder::*;
|
||||
pub use sorter::*;
|
||||
pub use stage::*;
|
||||
pub use step::*;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-plugin"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -13,12 +13,12 @@ default = [ "vendored-lua" ]
|
|||
vendored-lua = [ "mlua/vendored" ]
|
||||
|
||||
[dependencies]
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.2.5" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-adapter = { path = "../yazi-adapter", version = "0.3.0" }
|
||||
yazi-boot = { path = "../yazi-boot", version = "0.3.0" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
ansi-to-tui = "=3.1.0"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-proxy"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -13,8 +13,8 @@ default = [ "vendored-lua" ]
|
|||
vendored-lua = [ "mlua/vendored" ]
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-scheduler"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -9,11 +9,11 @@ homepage = "https://yazi-rs.github.io"
|
|||
repository = "https://github.com/sxyazi/yazi"
|
||||
|
||||
[dependencies]
|
||||
yazi-config = { path = "../yazi-config", version = "0.2.5" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.2.5" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.2.5" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.2.5" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.2.5" }
|
||||
yazi-config = { path = "../yazi-config", version = "0.3.0" }
|
||||
yazi-dds = { path = "../yazi-dds", version = "0.3.0" }
|
||||
yazi-plugin = { path = "../yazi-plugin", version = "0.3.0" }
|
||||
yazi-proxy = { path = "../yazi-proxy", version = "0.3.0" }
|
||||
yazi-shared = { path = "../yazi-shared", version = "0.3.0" }
|
||||
|
||||
# External dependencies
|
||||
anyhow = "1.0.86"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "yazi-shared"
|
||||
version = "0.2.5"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
authors = [ "sxyazi <sxyazi@gmail.com>" ]
|
||||
|
|
@ -25,7 +25,7 @@ shell-words = "1.1.0"
|
|||
tokio = { version = "1.39.2", features = [ "full" ] }
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { version = "0.52.0", features = [ "Win32_Storage_FileSystem", "Win32_UI_Shell" ] }
|
||||
windows-sys = { version = "0.59.0", features = [ "Win32_Storage_FileSystem", "Win32_UI_Shell" ] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { version = "0.27.0", features = [ "use-dev-tty" ] }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue