From 67f5fb7149e5afbe80c1e878157caaee32c22fe4 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 07:12:12 -0500 Subject: [PATCH 01/17] impr: add links to optional dependencies, clarify text --- docs/installation.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 2a536d01..fef491b7 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -5,18 +5,21 @@ description: How to install Yazi on various operating systems. # Installation -Prerequisites: - -- file (required, for file type detection) -- nerd-fonts ([_optional_](./faq.md#i-dont-like-nerdfonts)) -- ffmpegthumbnailer (_optional_, for video thumbnails) -- unar (_optional_, for archive preview) -- jq (_optional_, for JSON preview) -- poppler (_optional_, for PDF preview) -- fd (_optional_, for file searching) -- rg (_optional_, for file content searching) -- fzf (_optional_, for quick file subtree navigation) -- zoxide (_optional_, for historical directories navigation) +To use Yazi, you must have the following prerequisites installed: + +- file (for file type detection) + +Yazi can be _optionally_ extended with other command line tools to enable additional features. + +- [nerd-fonts](https://www.nerdfonts.com/) ([_recommended_](./faq.md#i-dont-like-nerdfonts)) +- [`ffmpegthumbnailer`](https://github.com/dirkvdb/ffmpegthumbnailer) (for video thumbnails) +- [`unar`](https://theunarchiver.com/command-line) (for archive preview) +- [`jq`](https://jqlang.github.io/jq/) (for JSON preview) +- [`poppler`](https://poppler.freedesktop.org/) (for PDF preview) +- [`fd`](https://github.com/sharkdp/fd) (for file searching) +- [`rg`](https://github.com/BurntSushi/ripgrep) (for file content searching) +- [`fzf`](https://github.com/junegunn/fzf) (for quick file subtree navigation) +- [`zoxide`](https://github.com/ajeetdsouza/zoxide) (for historical directories navigation) ## Arch Linux From 127702b862a54343dcb928b00f029fd626c9f5b9 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 07:54:33 -0500 Subject: [PATCH 02/17] refactor: rename files, reorganize quick-start, label/heading fixes --- docs/configuration/theme.md | 2 +- docs/{installation.md => install.md} | 0 docs/plugin/_category_.json | 8 -- docs/plugins/_category_.json | 8 ++ docs/{plugin => plugins}/api.md | 2 +- docs/{plugin => plugins}/overview.md | 2 +- docs/quick-start.md | 136 +++++++++++++-------------- 7 files changed, 79 insertions(+), 79 deletions(-) rename docs/{installation.md => install.md} (100%) delete mode 100644 docs/plugin/_category_.json create mode 100644 docs/plugins/_category_.json rename docs/{plugin => plugins}/api.md (99%) rename docs/{plugin => plugins}/overview.md (96%) diff --git a/docs/configuration/theme.md b/docs/configuration/theme.md index 7d8241b7..8197463f 100644 --- a/docs/configuration/theme.md +++ b/docs/configuration/theme.md @@ -6,7 +6,7 @@ description: Learn how to configure your Yazi theme. # theme.toml :::tip -If you're looking for ready-made themes and don't want to create one yourself, check out [yazi-rs/themes](https://github.com/yazi-rs/themes) repo. +If you're looking for ready-made themes and don't want to create one yourself, check out the [yazi-rs/themes](https://github.com/yazi-rs/themes) repository. ::: ## Types diff --git a/docs/installation.md b/docs/install.md similarity index 100% rename from docs/installation.md rename to docs/install.md diff --git a/docs/plugin/_category_.json b/docs/plugin/_category_.json deleted file mode 100644 index c7b15f97..00000000 --- a/docs/plugin/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Plugin (Work in progress)", - "position": 4, - "link": { - "type": "doc", - "id": "plugin/overview" - } -} diff --git a/docs/plugins/_category_.json b/docs/plugins/_category_.json new file mode 100644 index 00000000..5924c263 --- /dev/null +++ b/docs/plugins/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Plugins (BETA)", + "position": 4, + "link": { + "type": "doc", + "id": "plugins/overview" + } +} diff --git a/docs/plugin/api.md b/docs/plugins/api.md similarity index 99% rename from docs/plugin/api.md rename to docs/plugins/api.md index e374ac97..c52f19ee 100644 --- a/docs/plugin/api.md +++ b/docs/plugins/api.md @@ -3,7 +3,7 @@ sidebar_position: 1 description: Learn how to use Yazi's Lua API. --- -# API (Work in progress) +# API ## Layout diff --git a/docs/plugin/overview.md b/docs/plugins/overview.md similarity index 96% rename from docs/plugin/overview.md rename to docs/plugins/overview.md index ee7da10b..3d1dd29f 100644 --- a/docs/plugin/overview.md +++ b/docs/plugins/overview.md @@ -5,7 +5,7 @@ sidebar_label: Plugin description: Learn how to extend Yazi with Lua plugins. --- -# Plugin (Work in progress) +# Plugins (BETA) You can extend Yazi's functionality through Lua plugins, which need to be placed in the `plugins` subdirectory within Yazi's configuration directory: diff --git a/docs/quick-start.md b/docs/quick-start.md index 2ba57aad..3b468eaa 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'; # Quick Start -After [installing](./installation.md), use the following command to run it: +Once you've [installed Yazi](./install.md), start the program with: ```bash yazi @@ -16,16 +16,77 @@ yazi Press `q` to quit and `~` to open the help menu. -## Themes +## Shell function + +We suggest using this ya shell function that provides the ability to change the current working directory when exiting Yazi. + + + + +```bash +function ya() { + tmp="$(mktemp -t "yazi-cwd.XXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + cd -- "$cwd" + fi + rm -f -- "$tmp" +} +``` + + + + +```shell +function ya + set tmp (mktemp -t "yazi-cwd.XXXXX") + yazi $argv --cwd-file="$tmp" + if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + cd -- "$cwd" + end + rm -f -- "$tmp" +end +``` + + + + +```shell +def --env ya [args?] { + let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5) + yazi $args --cwd-file $tmp + let cwd = (open $tmp) + if $cwd != "" and $cwd != $env.PWD { + cd $cwd + } + rm -f $tmp +} +``` -We have created a repo to collect themes from the community. Pick a theme you like! + + + +```powershell +function ya { + $tmp = [System.IO.Path]::GetTempFileName() + yazi $args --cwd-file="$tmp" + $cwd = Get-Content -Path $tmp + if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) { + Set-Location -Path $cwd + } + Remove-Item -Path $tmp +} +``` + + + -https://github.com/yazi-rs/themes +To use it, copy the function into the configuration file of your respective shell. ## Keybindings :::tip -To see all key bindings, check the [yazi-config/preset/keymap.toml](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) file. +For all key bindings, see our [Keymap Reference](./configuration/keymap.md). ::: ### Navigation @@ -139,67 +200,6 @@ _Observation: `, โ‡’ a` indicates pressing the `,` key followed by pressing the | , โ‡’ s | Sort by size | | , โ‡’ S | Sort by size (reverse) | -## Changing working directory when exiting Yazi - -You can also use this convenient wrapper that provides the ability to change the current working directory when exiting Yazi. - - - - -```bash -function ya() { - tmp="$(mktemp -t "yazi-cwd.XXXXX")" - yazi "$@" --cwd-file="$tmp" - if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - cd -- "$cwd" - fi - rm -f -- "$tmp" -} -``` - - - - -```shell -function ya - set tmp (mktemp -t "yazi-cwd.XXXXX") - yazi $argv --cwd-file="$tmp" - if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - cd -- "$cwd" - end - rm -f -- "$tmp" -end -``` - - - - -```shell -def --env ya [args?] { - let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5) - yazi $args --cwd-file $tmp - let cwd = (open $tmp) - if $cwd != "" and $cwd != $env.PWD { - cd $cwd - } - rm -f $tmp -} -``` - - - - -```powershell -function ya { - $tmp = [System.IO.Path]::GetTempFileName() - yazi $args --cwd-file="$tmp" - $cwd = Get-Content -Path $tmp - if (-not [String]::IsNullOrEmpty($cwd) -and $cwd -ne $PWD.Path) { - Set-Location -Path $cwd - } - Remove-Item -Path $tmp -} -``` +## Themes - - +Check out our [themes repository](https://github.com/yazi-rs/themes), [suggest a new one](https://github.com/yazi-rs/themes/issues/new), or [make your own](./configuration/theme.md)! From 22c17c15b9f421406e564525252ccb9f2152803b Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 08:36:22 -0500 Subject: [PATCH 03/17] impr: update configuration overview --- docs/configuration/overview.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/configuration/overview.md b/docs/configuration/overview.md index f7b3ebb4..2aeb17d2 100644 --- a/docs/configuration/overview.md +++ b/docs/configuration/overview.md @@ -9,21 +9,15 @@ description: Learn how to configure Yazi. There are three configuration files for Yazi: -- [`yazi.toml`](./yazi.md) - General configuration -- [`keymap.toml`](./keymap.md) - Keybinds configuration -- [`theme.toml`](./theme.md) - Color scheme configuration +- [`yazi.toml`](./yazi.md) - General configuration. +- [`keymap.toml`](./keymap.md) - Keybinds configuration. +- [`theme.toml`](./theme.md) - Color scheme configuration. -You can find the default configurations at: https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. +You can find the default configuration files at https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. -To override any of the defaults, begin by copying the appropriate file to following location: +To override any of the defaults, begin by copying the appropriate file from the directory linked above to the Yazi configuration directory. On Unix/Unix-like systems, the configuration directory is `~/.config/yazi/`, and on Windows, the configuration directory is `C:\Users\USERNAME\AppData\Roaming\yazi\config\` (replacing `USERNAME` with your username). -- Unix: `~/.config/yazi/` -- Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\` - -For example, to edit the keymaps, start by copying `keymap.toml` file (found [here](https://github.com/sxyazi/yazi/tree/main/yazi-config/preset)) to: - -- Unix: `~/.config/yazi/keymap.toml` -- Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` +For example, to edit keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to `~/.config/yazi/keymap.toml` (Unix/Unix-like) or `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` (Windows). ## Custom config directory From 8a94b2f118cc67e06ecb5cf278bd349724ab3fdb Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:03:30 -0500 Subject: [PATCH 04/17] fix: home page link --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index deeffe97..6ca64ec0 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -17,7 +17,7 @@ function HomepageHeader() {

{siteConfig.tagline}

- + Get Started ๐Ÿš€
From b872a19621e9d994df8c8aed5f74991f13abe131 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:10:32 -0500 Subject: [PATCH 05/17] feat: add windows install to docs, grammar --- docs/install.md | 71 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/docs/install.md b/docs/install.md index fef491b7..12c7cd2f 100644 --- a/docs/install.md +++ b/docs/install.md @@ -27,23 +27,30 @@ Yazi can be _optionally_ extended with other command line tools to enable additi sudo pacman -S yazi ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` -If you want to use the latest git version, you can install it from [AUR](https://aur.archlinux.org/packages/yazi-git/) or [Arch Linux CN](https://github.com/archlinuxcn/repo/): +If you want to use the latest Git version, you can install it from [AUR](https://aur.archlinux.org/packages/yazi-git/) or [Arch Linux CN](https://github.com/archlinuxcn/repo/): ```bash paru -S yazi-git ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` -## macOS +## macOS / Homebrew -Install Yazi and its dependencies with Homebrew: +First, make sure that Homebrew is fully up-to-date with `brew update`. + +Then you can install Yazi by itself: + +```bash +brew install yazi +``` + +Or along with the optional dependencies: ```bash -brew update brew install yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide brew tap homebrew/cask-fonts && brew install --cask font-symbols-only-nerd-font ``` -If you prefer to use the most recent code, use `--HEAD` flag: +If you prefer to use the most recent code, use the `--HEAD` flag when installing Yazi. ```bash brew install yazi --HEAD @@ -51,13 +58,13 @@ brew install yazi --HEAD ## Nix -The [Nix package of Yazi](https://search.nixos.org/packages?channel=unstable&show=yazi) is available. Nix users can install Yazi via: +A [Nix package of Yazi](https://search.nixos.org/packages?channel=unstable&show=yazi) is available. Nix users can install Yazi via: ```bash -# On NixOS: +# NixOS: nix-env -iA nixos.yazi -# On Non NixOS: +# Not NixOS: nix-env -iA nixpkgs.yazi ``` @@ -70,8 +77,7 @@ environment.systemPackages = with pkgs; [ ]; ``` -You can also manage Yazi's configuration using the -[home-manager](https://nix-community.github.io/home-manager/options.html#opt-programs.yazi.enable). +You can also manage Yazi's configuration using [home-manager](https://nix-community.github.io/home-manager/options.html#opt-programs.yazi.enable). ## NetBSD @@ -81,7 +87,50 @@ pkgin install yazi ## Windows -See [Windows Installation Guide](https://github.com/sxyazi/yazi/wiki/Windows-Installation-Guide). +Windows has been supported since Yazi v0.1.4, but it's still in the early stage, so please file an issue if you encounter any bugs. + +### Requirements + +Yazi relies on `file(1)` to detect the `mime-type` of the file, and the easiest and most reliable way to get it on Windows is to install Git for Windows and use the `file(1)` that comes with it. + +1. Install Git for Windows by running [the official installer](https://git-scm.com/download/win), or through your package manager of choice. +2. To allow Yazi to find `file(1)`, add the Git for Windows `/usr/bin/` directory to the Windows path (not the `bash` path). Git for Windows' `/usr/bin/` directory differs depending on how you installed Git. + +- If you installed Git with the installer, add `C:\Program Files\Git\usr\bin` to the Windows path. Again, note that this directory depends on where you installed Git. +- If you installed Git with scoop, add `C:\Users\USERNAME\scoop\apps\git\current\usr\bin` to the Windows path. + +To check if you've done this properly, open a new `cmd` or `powershell` instance and enter `file`. You should see output similar to the following: + +``` +C:\Users\USERNAME>file +Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding] + [--mime-type] [-e ] [-F ] [-f ] + [-m ] [-P ] [--exclude-quiet] + ... + file -C [-m ] + file [--help] + +``` + +This is currently the only method we recommend. **We do NOT recommend `scoop install file`**, since Scoop's `file` cannot handle Unicode file names properly (e.g. `pexels-oliver-sjoฬˆstroฬˆm-1433052.jpg`). + +\*\* See https://www.c-sharpcorner.com/article/add-a-directory-to-path-environment-variable-in-windows-10/ for help on adding a directory to the Windows path. + +\*\* Note that adding this directory to the Windows path will make other Linux programs (such as `cat`, `ls`, and `vim`) that come from `/usr/bin/` accessible to `cmd` and `powershell`. + +### Installation + +First, install Scoop: https://scoop.sh/. Then, in a new `powershell` instance, enter: + +```sh +scoop install yazi unar jq poppler fd ripgrep fzf zoxide +``` + +Yazi on Scoop is maintained by community contributors and may not always have the latest version available. You may want to download the latest binary from [Yazi's GitHub Releases](https://github.com/sxyazi/yazi/releases) if that is the case. + +### Image Previews + +Currently, only WezTerm and Mintty (i.e., Git Bash, which comes with Git for Windows) support images, and [Yazi has adapted them](https://github.com/sxyazi/yazi#image-preview) to work right out of the box! Windows Terminal does not yet support images though, see https://github.com/microsoft/terminal/issues/5746. ## AOSC OS From 2b786c03a201ce40105519c5942d838275e45c69 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:25:00 -0500 Subject: [PATCH 06/17] impr: nix section --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 12c7cd2f..177cf208 100644 --- a/docs/install.md +++ b/docs/install.md @@ -58,7 +58,7 @@ brew install yazi --HEAD ## Nix -A [Nix package of Yazi](https://search.nixos.org/packages?channel=unstable&show=yazi) is available. Nix users can install Yazi via: +A [Nix package](https://search.nixos.org/packages?channel=unstable&show=yazi) for Yazi is available. ```bash # NixOS: From 89e7398899b4fcd8bcecbf1b89b74eb1dfbce210 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:43:04 -0500 Subject: [PATCH 07/17] impr: add file link --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 177cf208..9753f04d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -7,7 +7,7 @@ description: How to install Yazi on various operating systems. To use Yazi, you must have the following prerequisites installed: -- file (for file type detection) +- [file](https://github.com/file/file) (for file type detection) Yazi can be _optionally_ extended with other command line tools to enable additional features. From 87a32ab127dec69d77db09bc828c6374f93ad653 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:31:03 -0500 Subject: [PATCH 08/17] impr: quickstart tip --- docs/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quick-start.md b/docs/quick-start.md index 3b468eaa..cbd8f8b0 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -86,7 +86,7 @@ To use it, copy the function into the configuration file of your respective shel ## Keybindings :::tip -For all key bindings, see our [Keymap Reference](./configuration/keymap.md). +For all key bindings, see the [default `keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml). ::: ### Navigation From 81715c13e88b0d65fcd78272811a9280e64b1260 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:28:28 -0500 Subject: [PATCH 09/17] impr: back to bullet points --- docs/configuration/overview.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/configuration/overview.md b/docs/configuration/overview.md index 2aeb17d2..9d0c0f86 100644 --- a/docs/configuration/overview.md +++ b/docs/configuration/overview.md @@ -15,7 +15,10 @@ There are three configuration files for Yazi: You can find the default configuration files at https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. -To override any of the defaults, begin by copying the appropriate file from the directory linked above to the Yazi configuration directory. On Unix/Unix-like systems, the configuration directory is `~/.config/yazi/`, and on Windows, the configuration directory is `C:\Users\USERNAME\AppData\Roaming\yazi\config\` (replacing `USERNAME` with your username). +To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to either: + +- `~/.config/yazi/` on Unix/Unix-like systems. +- `C:\Users\USERNAME\AppData\Roaming\yazi\config\` on Windows. For example, to edit keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to `~/.config/yazi/keymap.toml` (Unix/Unix-like) or `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` (Windows). From 387a37c338c40fd4fcbfd7dfd46931834701cbbd Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 06:04:57 -0500 Subject: [PATCH 10/17] chore: move back to installation.md --- docs/{install.md => installation.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{install.md => installation.md} (100%) diff --git a/docs/install.md b/docs/installation.md similarity index 100% rename from docs/install.md rename to docs/installation.md From 300b964a926fb627753c1be329ff5e338da2707d Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 08:46:22 -0500 Subject: [PATCH 11/17] fix: home page link --- src/pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6ca64ec0..deeffe97 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -17,7 +17,7 @@ function HomepageHeader() {

{siteConfig.tagline}

- + Get Started ๐Ÿš€
From a892ee91553a9f086700075c0eac46da37e19b2e Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:11:12 -0500 Subject: [PATCH 12/17] chore: remove todo note from bottom of blog post --- blog/2023-10-29-why-is-yazi-fast.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/blog/2023-10-29-why-is-yazi-fast.md b/blog/2023-10-29-why-is-yazi-fast.md index 7de2451e..4b61320f 100644 --- a/blog/2023-10-29-why-is-yazi-fast.md +++ b/blog/2023-10-29-why-is-yazi-fast.md @@ -75,7 +75,3 @@ This is similar to having big and small cores in a CPU; when the big cores are i For complex tasks like file copying, a combination of micro and macro approaches is employed. Micro is used to recursively gather a list of all files to be copied, allowing users to see the number of tasks and their sizes in advance. Macro, on the other hand, handles the actual copying process. The advantage of task scheduling extends beyond providing ample concurrency for I/O and CPU resources; it also indirectly mitigates the depletion of system resources (such as file handles and CPU) due to sudden task surges. - -## TODO - -I'll find time to continue writing. From d9be3a76f1127c26924b4820e91fd9caa1e2e26f Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:14:02 -0500 Subject: [PATCH 13/17] fix: replace bash language tags with shell, missing link --- docs/configuration/overview.md | 6 +++--- docs/faq.md | 4 ++-- docs/installation.md | 28 ++++++++++++++-------------- docs/quick-start.md | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/configuration/overview.md b/docs/configuration/overview.md index 9d0c0f86..6e4acfe5 100644 --- a/docs/configuration/overview.md +++ b/docs/configuration/overview.md @@ -15,10 +15,10 @@ There are three configuration files for Yazi: You can find the default configuration files at https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. -To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to either: +To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to the Yazi configuration directory. -- `~/.config/yazi/` on Unix/Unix-like systems. -- `C:\Users\USERNAME\AppData\Roaming\yazi\config\` on Windows. +- On Unix/Unix-like systems: `~/.config/yazi/` +- Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\` For example, to edit keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to `~/.config/yazi/keymap.toml` (Unix/Unix-like) or `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` (Windows). diff --git a/docs/faq.md b/docs/faq.md index e028fb70..ec6d0fed 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -40,14 +40,14 @@ However, if you run Yazi in WSL, you can experience perfect image previews using You need to install `sshd` in WSL and start it: -```bash +```shell sudo apt install openssh-server sudo service ssh restart ``` Then, on the host machine, connect to WSL via SSH: -```bash +```shell wezterm ssh 127.0.0.1 ``` diff --git a/docs/installation.md b/docs/installation.md index 9753f04d..9e222bac 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -23,13 +23,13 @@ Yazi can be _optionally_ extended with other command line tools to enable additi ## Arch Linux -```bash +```shell sudo pacman -S yazi ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` If you want to use the latest Git version, you can install it from [AUR](https://aur.archlinux.org/packages/yazi-git/) or [Arch Linux CN](https://github.com/archlinuxcn/repo/): -```bash +```shell paru -S yazi-git ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` @@ -39,20 +39,20 @@ First, make sure that Homebrew is fully up-to-date with `brew update`. Then you can install Yazi by itself: -```bash +```shell brew install yazi ``` Or along with the optional dependencies: -```bash +```shell brew install yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide brew tap homebrew/cask-fonts && brew install --cask font-symbols-only-nerd-font ``` If you prefer to use the most recent code, use the `--HEAD` flag when installing Yazi. -```bash +```shell brew install yazi --HEAD ``` @@ -60,7 +60,7 @@ brew install yazi --HEAD A [Nix package](https://search.nixos.org/packages?channel=unstable&show=yazi) for Yazi is available. -```bash +```shell # NixOS: nix-env -iA nixos.yazi @@ -81,7 +81,7 @@ You can also manage Yazi's configuration using [home-manager](https://nix-commun ## NetBSD -```bash +```shell pkgin install yazi ``` @@ -134,7 +134,7 @@ Currently, only WezTerm and Mintty (i.e., Git Bash, which comes with Git for Win ## AOSC OS -```bash +```shell sudo oma install yazi ``` @@ -146,19 +146,19 @@ You can download the latest official binaries from [GitHub Releases](https://git Setup the latest stable Rust toolchain: -```bash +```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` Now you can install `yazi-fm` from [crates.io](https://crates.io/crates/yazi-fm): -```bash +```shell cargo install --locked yazi-fm ``` Or install the latest git version: -```bash +```shell cargo install --locked --git https://github.com/sxyazi/yazi.git ``` @@ -168,13 +168,13 @@ If it fails to build, please check if `make` and `gcc` is installed on your syst Setup the latest stable Rust toolchain: -```bash +```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` Clone the repository and build Yazi: -```bash +```shell git clone https://github.com/sxyazi/yazi.git cd yazi cargo build --release @@ -182,7 +182,7 @@ cargo build --release Then, you can run: -```bash +```shell ./target/release/yazi ``` diff --git a/docs/quick-start.md b/docs/quick-start.md index cbd8f8b0..47ab45e1 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -8,9 +8,9 @@ import TabItem from '@theme/TabItem'; # Quick Start -Once you've [installed Yazi](./install.md), start the program with: +Once you've [installed Yazi](./installation.md), start the program with: -```bash +```shell yazi ``` From 81f8851fe15e43e50e4de5e29a86e5ab67981000 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:36:56 -0500 Subject: [PATCH 14/17] chore: replace shell code block lang with sh --- docs/faq.md | 4 ++-- docs/installation.md | 28 ++++++++++++++-------------- docs/quick-start.md | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index ec6d0fed..12a5b55f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -40,14 +40,14 @@ However, if you run Yazi in WSL, you can experience perfect image previews using You need to install `sshd` in WSL and start it: -```shell +```sh sudo apt install openssh-server sudo service ssh restart ``` Then, on the host machine, connect to WSL via SSH: -```shell +```sh wezterm ssh 127.0.0.1 ``` diff --git a/docs/installation.md b/docs/installation.md index 9e222bac..a756a72a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -23,13 +23,13 @@ Yazi can be _optionally_ extended with other command line tools to enable additi ## Arch Linux -```shell +```sh sudo pacman -S yazi ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` If you want to use the latest Git version, you can install it from [AUR](https://aur.archlinux.org/packages/yazi-git/) or [Arch Linux CN](https://github.com/archlinuxcn/repo/): -```shell +```sh paru -S yazi-git ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` @@ -39,20 +39,20 @@ First, make sure that Homebrew is fully up-to-date with `brew update`. Then you can install Yazi by itself: -```shell +```sh brew install yazi ``` Or along with the optional dependencies: -```shell +```sh brew install yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide brew tap homebrew/cask-fonts && brew install --cask font-symbols-only-nerd-font ``` If you prefer to use the most recent code, use the `--HEAD` flag when installing Yazi. -```shell +```sh brew install yazi --HEAD ``` @@ -60,7 +60,7 @@ brew install yazi --HEAD A [Nix package](https://search.nixos.org/packages?channel=unstable&show=yazi) for Yazi is available. -```shell +```sh # NixOS: nix-env -iA nixos.yazi @@ -81,7 +81,7 @@ You can also manage Yazi's configuration using [home-manager](https://nix-commun ## NetBSD -```shell +```sh pkgin install yazi ``` @@ -134,7 +134,7 @@ Currently, only WezTerm and Mintty (i.e., Git Bash, which comes with Git for Win ## AOSC OS -```shell +```sh sudo oma install yazi ``` @@ -146,19 +146,19 @@ You can download the latest official binaries from [GitHub Releases](https://git Setup the latest stable Rust toolchain: -```shell +```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` Now you can install `yazi-fm` from [crates.io](https://crates.io/crates/yazi-fm): -```shell +```sh cargo install --locked yazi-fm ``` Or install the latest git version: -```shell +```sh cargo install --locked --git https://github.com/sxyazi/yazi.git ``` @@ -168,13 +168,13 @@ If it fails to build, please check if `make` and `gcc` is installed on your syst Setup the latest stable Rust toolchain: -```shell +```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` Clone the repository and build Yazi: -```shell +```sh git clone https://github.com/sxyazi/yazi.git cd yazi cargo build --release @@ -182,7 +182,7 @@ cargo build --release Then, you can run: -```shell +```sh ./target/release/yazi ``` diff --git a/docs/quick-start.md b/docs/quick-start.md index 47ab45e1..a19b817e 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; Once you've [installed Yazi](./installation.md), start the program with: -```shell +```sh yazi ``` @@ -37,7 +37,7 @@ function ya() { -```shell +```sh function ya set tmp (mktemp -t "yazi-cwd.XXXXX") yazi $argv --cwd-file="$tmp" @@ -51,7 +51,7 @@ end -```shell +```sh def --env ya [args?] { let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5) yazi $args --cwd-file $tmp From 436a847c4a6e61d830f66a9e3a8bb840f9c76ba9 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:05:38 -0500 Subject: [PATCH 15/17] impr: grammar of config directory explanation --- docs/configuration/overview.md | 6 +++--- docs/plugins/overview.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/configuration/overview.md b/docs/configuration/overview.md index 6e4acfe5..9d0c0f86 100644 --- a/docs/configuration/overview.md +++ b/docs/configuration/overview.md @@ -15,10 +15,10 @@ There are three configuration files for Yazi: You can find the default configuration files at https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. -To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to the Yazi configuration directory. +To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to either: -- On Unix/Unix-like systems: `~/.config/yazi/` -- Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\` +- `~/.config/yazi/` on Unix/Unix-like systems. +- `C:\Users\USERNAME\AppData\Roaming\yazi\config\` on Windows. For example, to edit keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to `~/.config/yazi/keymap.toml` (Unix/Unix-like) or `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` (Windows). diff --git a/docs/plugins/overview.md b/docs/plugins/overview.md index 3d1dd29f..23789c84 100644 --- a/docs/plugins/overview.md +++ b/docs/plugins/overview.md @@ -7,10 +7,10 @@ description: Learn how to extend Yazi with Lua plugins. # Plugins (BETA) -You can extend Yazi's functionality through Lua plugins, which need to be placed in the `plugins` subdirectory within Yazi's configuration directory: +You can extend Yazi's functionality through Lua plugins, which need to be placed in the `plugins` subdirectory of Yazi's configuration directory, so either: -- Unix: `~/.config/yazi/plugins/` -- Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\plugins\` +- `~/.config/yazi/plugins/` on Unix/Unix-like systems. +- `C:\Users\USERNAME\AppData\Roaming\yazi\config\plugins\` on Windows. ``` . From e6366f57182904d64ea8b951d5730ed53161af01 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:29:13 -0500 Subject: [PATCH 16/17] impr: apply suggestions --- docs/installation.md | 10 ++-------- docs/quick-start.md | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index a756a72a..bcaae571 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -33,17 +33,11 @@ If you want to use the latest Git version, you can install it from [AUR](https:/ paru -S yazi-git ffmpegthumbnailer unarchiver jq poppler fd ripgrep fzf zoxide ``` -## macOS / Homebrew +## macOS First, make sure that Homebrew is fully up-to-date with `brew update`. -Then you can install Yazi by itself: - -```sh -brew install yazi -``` - -Or along with the optional dependencies: +Then you can install Yazi (and the optional dependencies): ```sh brew install yazi ffmpegthumbnailer unar jq poppler fd ripgrep fzf zoxide diff --git a/docs/quick-start.md b/docs/quick-start.md index a19b817e..7a66248e 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -18,7 +18,7 @@ Press `q` to quit and `~` to open the help menu. ## Shell function -We suggest using this ya shell function that provides the ability to change the current working directory when exiting Yazi. +We suggest using this `ya` shell function that provides the ability to change the current working directory when exiting Yazi. From 74e8106bf8309a09c1d1640c7a28c92b18187361 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:42:54 -0500 Subject: [PATCH 17/17] impr: use list --- docs/configuration/overview.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/configuration/overview.md b/docs/configuration/overview.md index 9d0c0f86..3dc1bcf8 100644 --- a/docs/configuration/overview.md +++ b/docs/configuration/overview.md @@ -15,12 +15,15 @@ There are three configuration files for Yazi: You can find the default configuration files at https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. -To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to either: +To override any of the defaults, begin by copying the appropriate file (from the directory linked above) to: - `~/.config/yazi/` on Unix/Unix-like systems. - `C:\Users\USERNAME\AppData\Roaming\yazi\config\` on Windows. -For example, to edit keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to `~/.config/yazi/keymap.toml` (Unix/Unix-like) or `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` (Windows). +For example, to edit your keybindings, start by copying the [`keymap.toml` file](https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml) to: + +- `~/.config/yazi/keymap.toml` on Unix/Unix-like systems. +- `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` on Windows. ## Custom config directory