diff --git a/docs/configuration/keymap.md b/docs/configuration/keymap.md index 19331163..5e74a7f0 100644 --- a/docs/configuration/keymap.md +++ b/docs/configuration/keymap.md @@ -3,13 +3,13 @@ sidebar_position: 2 description: Learn how to configure keyboard shortcuts with Yazi. --- -# Keymap +# keymap.toml -:::tip -If you haven't created and used your own configuration file yet, please see [Configuration](./overview.mdx). +:::note +If you haven't created and used your own configuration file yet, please see [Configuration](./overview.md). ::: -## manager +## [manager] - escape: Cancel find, exit visual mode, clear selected, cancel filter, or cancel search. @@ -199,7 +199,7 @@ If you haven't created and used your own configuration file yet, please see [Con - help: Open the help menu. -## tasks +## [tasks] - close: Hide the task manager. - arrow: @@ -209,7 +209,7 @@ If you haven't created and used your own configuration file yet, please see [Con - cancel: Cancel the task. - help: Open the help menu. -## select +## [select] - close: Cancel selection. @@ -221,7 +221,7 @@ If you haven't created and used your own configuration file yet, please see [Con - help: Open the help menu. -## input +## [input] - close: Cancel input. @@ -274,15 +274,7 @@ If you haven't created and used your own configuration file yet, please see [Con - `backward`: Kill backwards to the start of the current word. - `forward`: Kill forwards to the end of the current word. -## Help - -- close: Hide the help menu. -- escape: Clear the filter, or hide the help menu. -- arrow - - `n`: Move the cursor up or down n lines. Negative value for up, positive value for down. -- filter: Apply a filter for the help items. - -## Completion +## [completion] - close: Hide the completion menu. @@ -293,3 +285,11 @@ If you haven't created and used your own configuration file yet, please see [Con - `n`: Move the cursor up or down n lines. Negative value for up, positive value for down. - help: Open the help menu. + +## [help] + +- close: Hide the help menu. +- escape: Clear the filter, or hide the help menu. +- arrow + - `n`: Move the cursor up or down n lines. Negative value for up, positive value for down. +- filter: Apply a filter for the help items. diff --git a/docs/configuration/overview.mdx b/docs/configuration/overview.md similarity index 66% rename from docs/configuration/overview.mdx rename to docs/configuration/overview.md index b0bb6f86..f7b3ebb4 100644 --- a/docs/configuration/overview.mdx +++ b/docs/configuration/overview.md @@ -7,7 +7,11 @@ description: Learn how to configure Yazi. # Configuration -There are multiple configuration files. They configure core yazi behavior, keymaps, and the theme, accordingly. +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 You can find the default configurations at: https://github.com/sxyazi/yazi/tree/main/yazi-config/preset. @@ -20,3 +24,7 @@ For example, to edit the keymaps, start by copying `keymap.toml` file (found [he - Unix: `~/.config/yazi/keymap.toml` - Windows: `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` + +## Custom config directory + +You can change the Yazi configuration directory by exporting the `YAZI_CONFIG_HOME` environment variable. diff --git a/docs/configuration/theme.md b/docs/configuration/theme.md index 540f6c83..9efc3441 100644 --- a/docs/configuration/theme.md +++ b/docs/configuration/theme.md @@ -3,7 +3,7 @@ sidebar_position: 3 description: Learn how to configure your Yazi theme. --- -# 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. @@ -44,7 +44,7 @@ If you're looking for ready-made themes and don't want to create one yourself, c - hidden (Boolean): Hidden - crossed (Boolean): Crossed out -## Manager +## [manager] - cwd (Style): CWD text style. @@ -84,7 +84,7 @@ Highlighting: The built-in syntax highlighting feature - syntect_theme (String): Theme file path. Since Yazi and `bat` use the same highlighter, so you can directly use bat's theme files, such as `~/.config/bat/themes/Catppuccino-mocha.tmTheme`. -## Status +## [status] - separator_open (String): Opening separator symbol. e.g. `"["`. - separator_close (String): Closing separator symbol. e.g. `"]"`. @@ -110,20 +110,20 @@ Permissions - permissions_x (Style): Execute permission. - permissions_s (Style): `-` separator. -## Select +## [select] - border (Style): Border style. - active (Style): Selected item style. - inactive (Style): Unselected item style. -## Input +## [input] - border (Style): Border style. - title (Style): Title style. - value (Style): Value style. - selected (Style): Selected value style. -## Completion +## [completion] - border (Style): Border style. - active (Style): Selected item style. @@ -135,13 +135,13 @@ Icons - icon_folder (String): Folder icon. - icon_command (String): Command icon. -## Tasks +## [tasks] - border (Style): Border style. - title (Style): Title style. - hovered (Style): Hovered item style. -## Which +## [which] - mask (Style): Mask style. - cand (Style): Candidate key style. @@ -150,7 +150,7 @@ Icons - separator (String): Separator symbol. e.g. `" -> "`. - separator_style (Style): Separator style. -## Help +## [help] - on (Style): Key column style. - exec (Style): Command column style. @@ -158,7 +158,7 @@ Icons - hovered (Style): Hovered item style. - footer (Style): Footer style. -## Filetype +## [filetype] Set file list item display styles for specific file types, supporting matching by name and mime-type: @@ -185,7 +185,7 @@ Each rule supports complete [Style properties](#Types). There are two special ru - `name = "*"` matches all files. - `name = "*/"` matches all directories. -## Icons +## [icons] Display different icons based on file name rules, noting that the `/` after the name signifies that it must be a directory. diff --git a/docs/configuration/yazi.md b/docs/configuration/yazi.md index edca1ed0..9184982e 100644 --- a/docs/configuration/yazi.md +++ b/docs/configuration/yazi.md @@ -3,13 +3,13 @@ sidebar_position: 1 description: Learn how to configure Yazi's basic functionality. --- -# Yazi +# yazi.toml -:::tip -If you haven't created and used your own configuration file yet, please see [Configuration](./overview.mdx). +:::note +If you haven't created and used your own configuration file yet, please see [Configuration](./overview.md). ::: -## manager +## [manager] - layout: Manager layout by ratio, 3-element array @@ -59,7 +59,7 @@ If you haven't created and used your own configuration file yet, please see [Con - `true`: Show - `false`: Do not show -## preview +## [preview] - tab_size: Tab width - max_width: Maximum preview width for images. Do a `yazi --clear-cache` to take effect after changing this. @@ -75,7 +75,7 @@ This is useful for solving [the bug of Ueberzug image size calculation](https:// If your monitor has a `2.0` scale factor, and is running on Wayland under Hyprland, you may need to set `ueberzug_scale: 0.5`, and adjust the value of `ueberzug_offset` according to your case, to offset this issue. -## opener +## [opener] Configure available openers, for example: @@ -105,7 +105,7 @@ Available parameters are as follows: - `linux`: Linux - `macos`: macOS -## open +## [open] Set rules for opening specific files, for example: @@ -129,7 +129,7 @@ Available rule parameters are as follows: - mime (String): Glob expression for matching the MIME type. Case insensitive by default, add `\s` to the beginning to make it sensitive. - use (String): Opener name corresponding to the names in the [`[opener]` section](#opener). -## tasks +## [tasks] - micro_workers: Maximum number of concurrent micro-tasks - macro_workers: Maximum number of concurrent macro-tasks @@ -141,7 +141,7 @@ Available rule parameters are as follows: - image_alloc: Maximum memory allocation limit (in bytes) for decoding a single image, `0` for unlimited. - image_bound(`[width, height]`): Maximum image size (in pixels) for decoding a single image, `0` for unlimited. -## input +## [input] You can customize the title and position of each `Input`. As for position, it consists of two parts: [Origin](#origin) and [Offset](#offset). @@ -188,6 +188,6 @@ Some `Input`s have special placeholders that will be replaced with actual conten - `{n}`: Number of tasks are running - `{s}`: `"s"` if `n > 1`, otherwise `""` -## select +## [select] Same as [the input](#input).