feat: new plugin zoom.yazi to zoom in or out of the preview image
This commit is contained in:
44
zoom.yazi/README.md
Normal file
44
zoom.yazi/README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
> [!NOTE]
|
||||
> The latest Yazi nightly build is required to use this plugin at the moment.
|
||||
|
||||
# zoom.yazi
|
||||
|
||||
Enlarge or shrink the preview image of a file, which is useful for magnifying small files for viewing.
|
||||
|
||||
Supported formats:
|
||||
|
||||
- Images - [ImageMagick](https://imagemagick.org/) is required
|
||||
|
||||
Note that, the maximum size of enlarged images is limited by the [`max_width`][max_width] and [`max_height`][max_height] configuration options, so you may need to increase them as needed.
|
||||
|
||||
[max_width]: https://yazi-rs.github.io/docs/configuration/yazi#preview.max_width
|
||||
[max_height]: https://yazi-rs.github.io/docs/configuration/yazi#preview.max_height
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
ya pkg add yazi-rs/plugins:zoom
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```toml
|
||||
# keymap.toml
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "+"
|
||||
run = "plugin zoom 1"
|
||||
desc = "Zoom in hovered file"
|
||||
|
||||
[[mgr.prepend_keymap]]
|
||||
on = "-"
|
||||
run = "plugin zoom -1"
|
||||
desc = "Zoom out hovered file"
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] Support more file types (e.g., videos, PDFs), PRs welcome!
|
||||
|
||||
## License
|
||||
|
||||
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.
|
||||
Reference in New Issue
Block a user