Update 2026-01-31

Update 2026-01-27
This commit is contained in:
2026-01-31 17:45:16 +02:00
parent 8c606045e1
commit 5324f54618
73 changed files with 6508 additions and 5373 deletions

View File

@@ -14,31 +14,46 @@ what-size supports Yazi on Linux, macOS, and Windows.
### Yazi
- yazi `25.5.28` and onwards since commit `c5c939b` ([link](https://github.com/pirafrank/what-size.yazi/commit/c5c939bb37ec1d132c942cf5724d4e847acc2977))
- yazi `25.x`-`25.4.8` since commit `fce1778` ([link](https://github.com/pirafrank/what-size.yazi/commit/fce1778d911621dc57796cdfdf11dcda3c2e28de))
- yazi `0.4.x` since commit `2780de5` ([link](https://github.com/pirafrank/what-size.yazi/commit/2780de5aeef1ed16d1973dd6e0cd4d630c900d56))
- yazi `0.3.x` up to commit `f08f7f2` ([link](https://github.com/pirafrank/what-size.yazi/commit/f08f7f2d5c94958ac4cb66c51a7c24b4319c6c93))
In an effort to make things easy, I keep `compatibility/yazi-x.y.z` branches with each pointing to the most up-to-date commit compatible with yazi release `x.y.z`. Full table below.
|Yazi releases|what-size branch name|
|---|---|
|*[latest stable](https://github.com/sxyazi/yazi/releases/latest)*|`main`|
|`25.5.28`|`compatibility/yazi-25.5.28`|
|`25.x`-`25.4.8`|`compatibility/yazi-25.4.8`|
|`0.4.x`|`compatibility/yazi-0.4.x`|
|`0.3.x`|`compatibility/yazi-0.3.x`|
Please notice that `nightly` releses may work but are not explicitly supported.
## Requirements
### Before Yazi's version 25.5.28
- Use this commit: [Old version](https://github.com/pirafrank/what-size.yazi/commit/d8966568f2a80394bf1f9a1ace6708ddd4cc8154)
- `du` on Linux and macOS
- PowerShell on Windows
### On Yazi's version 25.5.28 or newer
- No requirement
## Installation
```sh
ya pkg add pirafrank/what-size
```
or
or (**DEPRECATED** - use only for yazi `25.4.8` and older):
**DEPRECATED**
```sh
ya pack -a 'pirafrank/what-size'
```
## Usage
### Keymap
Add this to your `~/.config/yazi/keymap.toml`:
```toml
@@ -54,18 +69,30 @@ If you want to copy the result to clipboard, you can add `--clipboard` or `-c` a
[[mgr.prepend_keymap]]
on = [ ".", "s" ]
run = "plugin what-size -- '--clipboard'"
desc = "Calc size of selection or cwd"
desc = "Calc size of sel/cwd + paste to clipboard"
```
```toml
[[mgr.prepend_keymap]]
on = [ ".", "s" ]
run = "plugin what-size -- '-c'"
desc = "Calc size of selection or cwd"
desc = "Calc size of sel/cwd + paste to clipboard"
```
Change to whatever keybinding you like.
### User interface (optional)
If you want to place the size value exactly where you want, modify the priority value. Also changing two strings `LEFT` and `RIGHT` will add them to the left and right side of the value. Remember to add to and change these lines inside your `init.lua` file if you want to customize, or the plugin will use this configuration by default:
```lua
require("what-size"):setup({
priority = 400,
LEFT = "",
RIGHT = " ",
})
```
## Feedback
If you have any feedback, suggestions, or ideas please let me know by opening an issue.
@@ -82,6 +109,16 @@ YAZI_LOG=debug yazi
Logs will be saved to `~.local/state/yazi/yazi.log` file.
### Plugin definition
The repo already has a `.luarc.json` file. You only need to run the following to add the `types` plugin dependency:
```sh
ya pkg add yazi-rs/plugins:types
```
as per the [docs](https://github.com/yazi-rs/plugins/tree/main/types.yazi).
## Contributing
Contributions are welcome. Please fork the repository and submit a PR.